Need permission solution for sharing media among users
I have been unable to find satisfactory solution for my computing scenario. I have a collection of images as well as music I would like to share between several users on a single machine. The files are located in /media/images and /media/music respectively. However, I have not found a suitable way to force the permissions of files added to these two directories to allow all the other users access files added by other users. I have tried ACL with default ACLs, and while I can make new files inherit the default permissions of the directory, when files are copied to these directories, they preserve their original permissions.
So, for example, user bob mounts a SD card and copies the images to /media/images. The images retain their permissions from the SD card and are read/writeable by bob, only readable by group and others. I would like all files in /media/image to be forced to be read/writable by group. Since I don't have a good solution, user Sue logs on, tries to edit the image, but cannot. A messy approach I have tried is to have a script (with UID bit set) run at login and chmod (or setfacl, for a different approach) /media recursively. Even though this works, its rough, slow, and the user might attempt to use a file before the script has finished changing the permissions for all the files. I'm not sure there is a way to force permissions in linux, even with ACLs. But there has to be a better solution. Could I mount /media separately so that all users of a certain group gain rw access? Or should I set up a network share (like Samba) so that users access /media through a network mount and the network share manages the privledges? Should I use a virtual file system (questionable)? Should I make everyone root and never worry about permissions again? Just kidding on the last one:) Thanks, Colin |
Maybe create a group called media_users, give required permissions to this group and add all the respective users to this group.
Also "cp --no-preserve" command doesn't retain any attributes from the SD card. See 'man cp' for more info. |
Quote:
Still, is there a way to force the permissions of a file going into the /media directory regardless of how the other users put them there. There is no guarantee that the other uses will use the --no-preserve argument. Perhaps there is some way to configure the File Alteration Monitor so that it will change the permissions on files as they are added to the /media directory. Thanks, Colin |
All times are GMT -5. The time now is 08:58 AM. |