NFS file permissions for new files

Posted on 2008-10-28
Last Modified: 2013-12-02
I have a file server that shares with Windows clients via SMB and Linux clients via NFS. When a Windows user creates a new file on the share it uses group/user permissions for new files that are set in the smb.conf file, when a Linux/NFS client creates a new file it is given a different set of permissions. Is there any way to set what group/user permissions are used for NFS in a similar way as is done with Samba?

My NFS shares are exported using:


All users and groups for Windows and Linux come from an Active Directory.
Question by:coanda
  • 4
  • 2
LVL 68

Expert Comment

ID: 22827120
did you consider using umask ?
LVL 68

Expert Comment

ID: 22827195
... or let your Linux clients do smbmount ?

Author Comment

ID: 22827298
I figured that I'd have to add a mask somewhere, the question should probably have been worded more like "what configuration (file) do I add a mask to?"

And no, I prefer to use NFS for Linux clients.
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

LVL 68

Accepted Solution

woolmilkporc earned 500 total points
ID: 22829276
You should modify the user's profiles on the client side. Which file to modify depends on the shell used, in ksh it's e.g. ~ /.profile , in csh e.g. ~/..cshrc and ~/.login,  in bash e.g. ~/.bashrc, ~/.profile, ~/.bash_login or ~/.bash_profile.
The 'env' method works as well.
Of course you could change the umask globally in /etc/profile.
I wouldn't recommend that.

Author Comment

ID: 22832769
To ~/.bashrc I added:
  umask 002
to bring the default permissions from 666 to 664.
LVL 68

Expert Comment

ID: 22833063
Any reason for grade B?

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

Suggested Solutions

Hello, As I have seen there a lot of requests regarding monitoring and reporting for exchange 2007 / 2010 / 2013 I have decided to post some thoughts together and link to articles that have helped me. Of course a lot of information you can get…
If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
A company’s greatest vulnerability is their email. CEO fraud, ransomware and spear phishing attacks are the no1 threat to a company’s security. Cybercrime is responsible for the largest loss of money to companies today with losses projected to r…

929 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now