[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Sheflug] File permissions fun
> Another way of hacking it might be to stick a "chmod g+w
> <photodirectory>/*" in the appropriate crontab.
>
> For doing exactly what Dave requires, it looks as though ACLs might be needed:
>
> http://www.linuxformat.co.uk/index.php?name=PNphpBB2&file=viewtopic&t=9118&start=0&postdays=0&postorder=asc&highlight=
I've got the ACLs sort-of working (but not quite right).
I now have a folder called:
/home/photos
with two sub-folders:
/home/photos/davo (for photos I import from my camera - owner set to 'davo')
/home/photos/sarah (for photos my wife will import - owner set to 'sarah')
I used the chown/chmod commands to set up the /home/photos folder to
be in the group 'photoshare' with the 'set group id':
drwxr-sr-x+ 4 davo photoshare 4096 2008-12-21 17:33 photos
I then used the following command to set up the ACL:
$ sudo setfacl -Rm default:group::rw photos
This appears to work in so far as anything created in the
'/home/photos/davo' folder has the following permissions:
-rw-rw-r--+ 1 davo photoshare 6 2008-12-21 17:42 test
and anything created in the '/home/photos/sarah' folder has the
following permissions:
-rw-rw-r--+ 1 sarah photoshare 5 2008-12-21 17:42 test
Great! Both of us can edit the files created by each other.
BUT, if either user tries to create a file in the folder owned by the
other, I get a 'permission denied' error. e.g.:
$ cd /home/photos/sarah (as myself)
$ cat > test2
bash: test2: Permission denied
Is there something I am still missing?
Davo
_______________________________________________
Sheffield Linux User's Group
http://sheflug.org.uk/mailman/listinfo/sheflug_sheflug.org.uk
FAQ at: http://www.sheflug.org.uk/mailfaq.html
GNU - The Choice of a Complete Generation