Question on file permissions

Discussion in 'macOS' started by funkahdafi, Jul 16, 2011.

  1. funkahdafi macrumors 6502

    Joined:
    Mar 16, 2009
    Location:
    Planet Earth, Old World
    #1
    Hi there,

    today I saw something on my system that kind of puzzeles me.

    When creating a new file as one user (say "User_A"), then the file is owned by User_A and the group staff. As seen when doing an ls -la:

    drwxr-xr-x 2 User_A staff 68 16 Jul 23:11 testing

    Now when I log out and log back in as another user, say User_B and I do a la -la on the same file, I see that the file is suddenly owned by User_B:

    drwxr-xr-x 2 User_B staff 68 16 Jul 23:11 testing

    How is that even possible? Is the file ownership dynamically assigned to whatever user is logged in? I don't get it. Any ideas?

    Thanks
     
  2. Madd the Sane macrumors 6502

    Madd the Sane

    Joined:
    Nov 8, 2010
    Location:
    Utah
    #2
    Wirelessly posted (Mozilla/5.0 (iPod; U; CPU iPhone OS 4_2_1 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8C148 Safari/6533.18.5)

    Where is the file? If it's on an external drive, the OS will show the file's owner as the currently logged-in user.
     

Share This Page