Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the '10.5: Share any files between users on the same Mac' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
10.5: Share any files between users on the same Mac
Authored by: Solarusdude on Jun 04, '09 11:34:11AM

This would work for the existing files in the directory, but probably wouldn't work for any new files. In my experience with POSIX permissions, when you copy a file into a directory, it will generally inherit the directory's owner, but it will not inherit the permission bits assigned to the directory.

For created files, the directory's set-UID and set-GID permission bits must be set in order for the file to be assigned the directory's user and group (or else it will be assigned to whatever user created the file). The permissions for the file will most likely be 755 (but that may be different if you altered the umask).

The tip listed above attempts to overcome these issues by using an ACL on the shared directory which is generally better at getting new files within that directory to conform to the directory's permissions.



[ Reply to This | # ]
10.5: Share any files between users on the same Mac
Authored by: Sesquipedalian on Jun 05, '09 01:26:03PM
Also, using the setuid/setgid bits can create security holes if any executable code is put into one of these folders. Whereas the ACL method would simply allow anyone to execute the code as themselves, using the setuid or setgid bits could allow privilege escalation by allowing anyone to run the code as someone else (e.g. as an admin, or even as root), making it possible for them to mess around with things they ought not to be able to mess around with.

[ Reply to This | # ]