LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-18-2007, 06:06 PM   #1
computercolin
LQ Newbie
 
Registered: Dec 2004
Distribution: Arch Linux
Posts: 3

Rep: Reputation: 0
Question 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
 
Old 01-18-2007, 06:25 PM   #2
Hitboxx
Senior Member
 
Registered: Mar 2006
Location: India
Distribution: Fedora
Posts: 1,562
Blog Entries: 3

Rep: Reputation: 68
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.
 
Old 01-21-2007, 11:47 AM   #3
computercolin
LQ Newbie
 
Registered: Dec 2004
Distribution: Arch Linux
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by shrikant.odugoudar
Also "cp --no-preserve" command doesn't retain any attributes from the SD card.
I'll have to try that. Perhaps I'll just write a script that copies files from the card to the appropriate directory with the --no-preserve argument.

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
 
  


Reply

Tags
filesystem, permissions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba: permission for sharing public and private folder zamri Linux - Software 16 02-02-2011 07:49 AM
Users Locked Out, Gdm Gone Beserk,14 hours @ work. No Solution yet. fragmented_user Linux - Newbie 17 09-02-2005 06:07 AM
Getting users permission phoenix99 Linux - Security 1 02-22-2005 05:36 PM
Sharing a directory with a regular user (with write permission) Ironica Linux - Newbie 6 05-31-2004 11:27 AM
The perfect Solution Windoze users switching to Linux: koolkat Linux - Distributions 1 09-28-2003 12:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration