1

I have a simple NFS share setup on CentOS 7 to allow my Mac to manage files in the /var/www/html directory:

/var/www/html 192.168.1.107(all_squash,anonuid=1000,anongid=1001,rw,sync)

Files and directories are created with the correct UID and GID, but the wrong umask:

-rw-r--r-- 1 1000 1001 41 Jul 1 15:05 index.html drwxr-xr-x 2 1000 1001 6 Jul 1 15:04 test_dir 

I need the permissions to be 664 and 775 respectively.

I have set the umask for the user (GID 1000) to "umask 000" for testing in .bashrc

When I log in as that user and touch a file in that directory I get 666 permissions.

This is the mount command I'm using on the Mac:

sudo mount -t nfs -o resvport,rw,vers=4 www:/var/www/html /mnt/www 

(www is the name of the CentOS server)

I have completely disable SELinux on this server and verifies that it is not enabled.

1 Answer 1

2

Turns out that the issue was the umask setting on the Mac machine. If I update the umask before I copy files to the NFS volume the files end up with the correct permissions.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.