LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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-17-2009, 06:42 PM   #1
lazylogic
Member
 
Registered: Aug 2006
Posts: 151

Rep: Reputation: 16
Need help with file access in common partition.


Sharing my desktop with 3 other users, and all have a common group id (gid=users).

Created a share partition and mounted it as /mnt/share_info

Intention is for all users to have rwx access to all files in this partition.

Have tried several mount options in the fstab but still unsuccessful.
Files create by user have read-write access but other user will only have only read access.


Any idea what is correct mount options in fstab that will allow files created to have read-write access to all users?

Or any other ways to acheive this.


Thanks in advance.
 
Old 01-17-2009, 06:57 PM   #2
jhwilliams
Senior Member
 
Registered: Apr 2007
Location: Portland, OR
Distribution: Debian, Android, LFS
Posts: 1,168

Rep: Reputation: 210Reputation: 210Reputation: 210
I believe you want to add the umask=somenumber option to the /mnt/share_info line in your /etc/fstab file.
 
Old 01-18-2009, 07:28 PM   #3
servat78
Member
 
Registered: Jan 2009
Posts: 100

Rep: Reputation: 17
I could be wrong, but my first guess is that some applications will create files with write permissions given only to the current users. Existing group/world write permission will be kept valid. First of all test what permissions your mainstream applications use for new files. Though the average application is supposed to add write permissions to the the group as well, and that is what you want, but it is obviously missing.

Take into consideration that each user will be the main master of it's own files, and your
"Intention is for all users to have rwx access to all files in this partition"
works only ig the group permissions are rwx for the group.

I'm not sure what happens if you make all 3 users share the same user ID as well in the /etc/passwd file. That would solve the whole issue. I never tried something like that.

In the worst case run a cronjob for each of the 3 users in regular intervals to issue
chmod -R g+w /mnt/share_info
but this would be brute force and a waste of system resources.

Debian

Last edited by servat78; 02-19-2009 at 12:07 PM.
 
Old 01-19-2009, 06:17 PM   #4
lazylogic
Member
 
Registered: Aug 2006
Posts: 151

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by jhwilliams View Post
I believe you want to add the umask=somenumber option to the /mnt/share_info line in your /etc/fstab file.
Tried that before coming here

but just couldn't get the options right
 
Old 01-19-2009, 06:23 PM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
How about setting the setgid permission on the dir?
What protocol, Samba, NFS ?
 
Old 01-19-2009, 06:35 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,125

Rep: Reputation: 164Reputation: 164
The umask option will only work for fat (and similar) partition types, not for native Linux partitions. You can change the top level directory permissions to be set gid so that files (and directories) created in that directory inherit the group ownership of the directory instead of the user. For example:
Code:
chmod -c g+s /mnt/share_info
Now when you create files/directories in /mnt/share_info they will have the same group membership as /mnt/share_info. If that's what you're looking for, there's some more info here
 
Old 01-19-2009, 06:40 PM   #7
lazylogic
Member
 
Registered: Aug 2006
Posts: 151

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by chrism01 View Post
What protocol, Samba, NFS ?
Didn't quite understand the protocol involved...

the shared partition is on the same computer e.g.
/dev/sda1 is /
/dev/sda2 is /home
/dev/sda3 is /shared_info #everyone logging into this desktop will dump files here for sharing, everyone should be able to edit ...

Quote:
How about setting the setgid permission on the dir?
Appreciate if you can explain a little, thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
How to restrict simultaneous multiple access to a common file squirrel001 Linux - Newbie 2 06-17-2008 01:13 PM
Common partition for xp and linux renna Linux - General 7 04-02-2008 02:22 AM
access file on windows partition jaymoney Ubuntu 2 04-25-2006 11:49 AM
common swap partition.. tenzan Linux - General 7 11-15-2005 05:49 AM
file permissions on VFAT partition - access denied cevjr Linux - Security 3 09-04-2003 05:50 PM


All times are GMT -5. The time now is 08:33 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration