1

I am successfully mount the remote directories on my local directories, I have to created folder and files with 777 permission so others can able to access this files so that's why I used umask=000 option during mount process. But problem is these newly created folder and files not created with 777 permission on remote server(NFS Server) IT create with 775 permission.

I have two servers with following user.

  1. NFS Server nfs2 root
  2. NFS clinet root stag

Following is the export entry on NFS server

/home/nfs2/mnt *(rw,sync,no_root_squash)

Following command I used to mount directories...

sshfs -o uid=1005,gid=1005,umask=000 nfs2@xxx.xxx.x.xx:/home/nfs2/mnt /home/stag/mount_point -o allow_other

After apply above command remote directory successfully mounted on /home/stag/mount_point with 777 permission.

Now I am creating directory using stag user.

**stag@ubuntu:~/mount_point$ mkdir test
stag@ubuntu:~/mount_point$ ls -l
total 4
drwxrwxrwx 1 stag stag 4096 Mar  5 14:24 test**

And it is created with 777 permission what I want, So on NFS client side I don't have any issue.

Now I checking on NFS server in /home/nfs2/mnt directory.

**root@192:/home/nfs2/mnt# ls -l
total 4 
drwxrwxr-x 2 nfs2 nfs2 4096 Mar  5 14:24 test**

As you see on NFS server test directory was created with 775 permission which did not I want, I want to create test directory with 777 permission.

I did everything to resolve this issue,

I set umask 000 into .bashrc file on NFS server but then also this issue not resolved.

I found following link in which one guy say I have apply patch for sshfs-fush to resolve the permission issue on server side and after that I have to used remote_umask and remote_fmask during mount process.

**http://andre.frimberger.de/index.php/linux/sshfs-fix-for-wrong-file-permissions-on-server/comment-page-1/#comment-211337**

But I don't know How to apply this patch.

Any know how to resolve this problem then please help me.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.