Public Directories

Hervé Fache Herve at lucidia.net
Wed Jul 5 13:32:27 BST 2006


On 6/22/06, Michael R. Head <burner at suppressingfire.org> wrote:
> You could set the directory's setuid and setgid flags. If the folder is
> group-owned by a group like "staff" or "users", then things will work
> pretty well (especially if you globally set umask to 002).

I would think the best way to do it is to have a group 'share' and set
setgid on the shared directory to 'share'. This way, we can keep track
of which user created what.

Now, if the user wants the other to be allowed to modify the file,
it's just a matter of setting the group-writeable bit. Examples:
- shared dir:
drw-r-s--t 0 root shared 0 2006-06-10 10:00 /home/share
- newly created file:
-rw-r----- 1 ryan shared 0 2006-06-15 20:30 testfile
- writeable shared file
-rw-rw---- 1 ryan shared 0 2006-06-15 20:30 testfile

Note that it would be nice NOT to have the dir/file world-readable.



More information about the ubuntu-devel mailing list