?
Solved

How to make an NFS export always read-write for all users?

Posted on 2005-04-15
7
Medium Priority
?
594 Views
Last Modified: 2011-09-20
Here's the situation:

We have a directory on our Linux server that we use to share files among our employees.  Let's call this /home/shared for example.  We share this directory via samba and NFS so that all our Windows, Mac, and Linux users may access it equally.

A problem we are running into is that our Mac-using webmaster will put a file in there via NFS, but the permissions are set such that the Windows-using webmaster cannot open the file.  How do we set up our exports file so that ALL files created in that directory are set with read-write permissions for all?

Here are excerpts from our current smb.conf and /etc/exports:

<smb snip>
[shared]
        comment = Server Shared Files
        path = /home/shared
        writeable = yes
        browsable = yes
        public = yes
        create mode = 0777
        directory mode = 0777
        guest ok = yes
        guest account = nobody
</snip>

this is /etc/exports:

/home/shared             192.168.1.0/255.255.255.0(rw,insecure,sync)
/home                    192.168.1.0/255.255.255.0(rw,root_squash,async)
0
Comment
Question by:sudama
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 13793868
did you check permissions on the file the Mac-user webmaster stored using NFS?

you should grant rights for the group to write, and maybe add this also:

chgroup nogroup /home/shared
chmod g+s /home/shared
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13802136
beside chmod g+s , what umask does your Mac use?
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 13809033
> put a file in there via NFS, but the permissions are set such that the Windows-using webmaster cannot open the file.
put
umask 000
in /etc/bashrc and /etc/csh.cshrc (system-wide) or in your .bashrc (.profile, .login, or .cshrc)

So the file create in Mac will be readable/writeabke for everyone.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 19

Expert Comment

by:Gabriel Orozco
ID: 13809522
I would instead check the umask for the user, since changing it system-wide would probably affect many other programs...
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13813377
so we wait for the answer to http:#13802136 ;-)
0
 

Author Comment

by:sudama
ID: 13816007
Maybe I was not being clear.

Files created by the Mac user in the NFS share on my Linux server are set at permissions of 644, with username adoss and groupname adoss.  

I want the files that she creates in the nfs share to be read-write for all.

We don't want all the files she creates on her own computer to be read-write for all.  

How exactly is this accomplished?
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 750 total points
ID: 13817222
So far NFS doesn't have this feature to do it automatically. In other words, no.
NFS to Unix/Linux OS is like local filesystem.
So the umask setting is applying to local filesystem as well as NFS mount directories.

Whatever you set in smb.conf is for the files create from Windows machine through SAMBA.
So it won't affect the files you create from/in Linux even though those files are on SAMBA shared directories.

You need to setup cron job to do
find /path-to-NFS-share -type f -user adoss -exec chmod a+rw {} \;
periodically (i.e. every 10 minutes)
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question