Welcome! Log In Create A New Profile

Advanced

NFS client R/W problem

Posted by habibie 
NFS client R/W problem
March 16, 2018 11:20AM
I just configured my Seagate Dockstar to export /srv directory with R/W mode and its /etc/exports file is shown as follows:
/srv    192.168.1.0/24(rw,root_squash,insecure,no_subtree_check,sync)

On my OpenSuSE Linux desktop computer, its /etc/fstab includes the following to auto mount the NFS drive as R/W:
ww.xx.yy.zz:/srv        /mnt        nfs    rw,async,hard,intr        0  0

So far, my Linux desktop computer has no problem to mount the /srv as an NFS drive. However, it can only mount the /srv as a R/O NFS drive. Can anyone here please help so that my Linux desktop computer will be able to mount the /srv as a R/W NFS drive?
Re: NFS client R/W problem
March 16, 2018 02:35PM
Try

/srv    192.168.1.0/24(rw,no_root_squash,insecure,no_subtree_check,sync)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NFS client R/W problem
March 16, 2018 05:41PM
bodhi Wrote:
-------------------------------------------------------
> Try
>
>
> /srv   
> 192.168.1.0/24(rw,no_root_squash,insecure,no_subtree_check,sync)
>
>
Bodhi,

I am not in favor of using the b]no_root_squash[/b] option. However, I really did try it before I posted here and it does not work. I don't know why. I also tried it on other OpenSUSE Linux desktop computer and ended with the same write permission denied message. Perhaps this has something to do with the NFS package on OpenSuSE?
Re: NFS client R/W problem
March 17, 2018 10:59AM
Found out what the problem is.

My server directory is owned by root user and root group. When mounted on a Linux Desktop computer, the directory is listed as owned by root user and root group. As such, a non-privilege user has no right to write on to the NFS drive. Once I changed the owner ID of the directory on my NFS server to the same user ID on all my Linux Desktop Computers, the users on all my Linux Desktop Computers can now write to the NFS drive. That makes sense. Now, I think the best way is to make the directory on my NFS server owned by a users group with R/W permission. This way, all regular users on any NFS clients with the same group ID can write to the NFS drive (see below). If you have implemented other ways, I am all ears. Now, it is time to configure samba.

On my Linux desktop computer:
[habibie@linux:/home/local/PEOPLE/habibie/Downloads/junk 703%] ~ cp -a ~/works/ffmpeg/血色黎明/第六集.mp4 /mnt/继父回家/
[habibie@linux:/home/local/PEOPLE/habibie/Downloads/junk 704%] ~ dir /mnt/继父回家/
total 1067648
-rw-r--r-- 1 root    users 178467784 Feb 15 19:15 第一集.mp4
-rw-r--r-- 1 root    users 180803541 Feb 15 21:18 第三集.mp4
-rw-r--r-- 1 root    users 182210980 Mar 15 22:32 第二集.mp4
-rw-r--r-- 1 root    users 177843368 Feb 15 22:20 第五集.mp4
-rw-r--r-- 1 habibie users 195265508 Mar  9 13:35 第六集.mp4
-rw-r--r-- 1 root    users 178652002 Feb 16 11:56 第四集.mp4
[habibie@linux:/home/local/PEOPLE/habibie/Downloads/junk 705%] ~

On my NFS server:
[root@debian:/root 16%] # dir /srv/继父回家/
total 1067648
-rw-r--r-- 1 root   users 178467784 Feb 15 19:15 第一集.mp4
-rw-r--r-- 1 root   users 180803541 Feb 15 21:18 第三集.mp4
-rw-r--r-- 1 root   users 182210980 Mar 15 22:32 第二集.mp4
-rw-r--r-- 1 root   users 177843368 Feb 15 22:20 第五集.mp4
-rw-r--r-- 1 debian users 195265508 Mar  9 13:35 第六集.mp4
-rw-r--r-- 1 root   users 178652002 Feb 16 11:56 第四集.mp4
[root@debian:/root 17%] #
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: