Saturday, November 23, 2019

centos - NFS files and directories created with wrong permissions from MacOS client

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.

No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...