LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-16-2008, 12:16 PM   #1
'58LesPaul
LQ Newbie
 
Registered: Apr 2008
Location: Chicago
Distribution: Ubuntu 7.10
Posts: 5

Rep: Reputation: 0
NFS shared directory problem


Hello,

Here's what I need to have happen:

I have an Ubuntu 7.10 server setup running nfs server. I have a directory on the server called "shared" (permissions set to 777). This directory needs to be shared across the network AND must allow read and write access to all users of the "share" group. Users of the "share" group must also be able to edit each others documents in the "shared" directory.

This is what is happening:

On the client (Ubuntu 7.10 desktop)I have set up the server's "shared" directory to mount (through fstab) at bootup to the "shared" (permissions set to 777) directory on the client.

Here's the fstab line"

192.168.0.210 /shared /shared nfs rw,user,noauto,exec 0 0

The problem that I am having is this: When user_1 creates a document and saves it in the "shared" directory on the server, user_2, user_3, etc... need to be able to view and edit this document. But unfortunately user_2, user_3, etc... cannot edit the document. They can view it, but not edit it.

What am I missing here? What didn't I set up properly? Obviously somewhere I don't have the file permissions set right for the shared directory but I can't figure out where or what I need to do to share this directory with all users of the "share" group and allow them all read and write access to every document enclosed in the directory. Currently all users can read and write to the directory (their own files), but they cannot edit files created by other users.

Is there a way to strip the file permissions from each document as it is saved to the "shared" directory? Or is it possible to set the file permissions of each document to 777 as they are saved to the "shared" directory maybe through a setting in the fstab line?

Any help with this situation would be greatly appreciated.

Thanks
LP

Last edited by '58LesPaul; 04-16-2008 at 12:25 PM.
 
Old 04-16-2008, 12:49 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
What umask value do the users have?

You could set the sgid bit on the directory. Then the file will inherit the group ("shared") of the directory. If the users umask is 007, then the file will have read/write access for all users who are members of the "shared" group.
 
Old 04-16-2008, 04:27 PM   #3
'58LesPaul
LQ Newbie
 
Registered: Apr 2008
Location: Chicago
Distribution: Ubuntu 7.10
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by jschiwal View Post
What umask value do the users have?

You could set the sgid bit on the directory. Then the file will inherit the group ("shared") of the directory. If the users umask is 007, then the file will have read/write access for all users who are members of the "shared" group.
Thanks for the reply. The umask value was set to 022. I changed it to 002 and now have read write access from all users of the group. Thank you!

Is it possible to have a umask value set in the fstab line for the NFS mount as opposed to having to change the umask value globaly in etc/profiles? That way only the files being saved to the shared directory will have the less secure permissions.

Thanks Again!
LP
 
Old 04-17-2008, 01:15 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Umask is a feature of the shell so it needs to be set when the user logs in. What kind of default group do the users have. Most distros create a group that is the same name as the user so the users default group is unique. That way there is no harm in having a umask value of 002.
On my system the users default group is "users". That is the first thing I noticed on SuSE and the first thing I changed.
 
  


Reply



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
NFS Sever Shared Directory - File Permissions Problem LakeWind Linux - Server 1 06-12-2007 02:51 AM
Why can I not write to an NFS client directory shared by Samba tmarston Red Hat 5 03-13-2007 08:22 PM
Problem mounting shared files using NFS vamseekrishna Linux - Software 7 12-13-2006 12:47 AM
Problem with shared directory Tezdread Linux - Networking 5 03-16-2004 04:46 PM
Umounting NFS shared directory matta Linux - Networking 2 03-09-2004 05:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:16 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