Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Originally posted by Tinkster Maybe that's a RH specific extension ... I've never
seen an exports with
before ... and man exports has no mention of that flag.
I've found it here: http://www.bsdatwork.com/2002/02/21/understanding_nfs/
" # su # cd serverhome # rm usersetup.png override rw-r--r-- root/mwlucas for usersetup.png? y rm: usersetup.png: Permission denied #
But I'm root! Why would it not let me delete a file?
I'm root on the client, but not on the server. The server doesn't trust root on other machines to execute commands as root on the server. It does trust usernames, however. NFS has a special option for handling root; you can map requests from root to any other username. For example, you might say that all requests from "root" on a client will run as "nfsroot" on the server. With careful use of groups, you could allow this nfsroot user to have limited access to things. Use the -maproot option to map root to another user."
Originally posted by mhallbiai i agree with Tinkster about the maproot option.
if you are wanting root's uid to be 0 (which it should already be), why not use the no_root_squash option
hope this helps
I did it, restarted nfs (/etc/init.d/nfs restart) and "mount -a" gives me this:
[root@polideukis kostas]# mount -a
mount: block device 10.0.0.3:/var/ftp is write-protected, mounting read-only
mount: cannot mount block device 10.0.0.3:/var/ftp read-only
I thought NFS has standard commands/paramaters -although different implementation, that's is why i use the BSD page as a resource.
Another cause for mount ... failed, reason given by server: Permission denied
Here's another cause for mount ... failed, reason given by server: Permission denied. I'm giving this for the benefit of others.
For me, it was a problem with /etc/exports:
I was trying to export from 10.0.0.15 to 10.0.0.13. Not until I added the first line above with .13 on the server, .15, and typed exportfs -ra did the error stopped. The last line was in error. Wildcards ("*") aren't allowed for IP addresses, only for hostnames (such as *.foo.com), but you can use CADR-type address/length, such as 10.0.0.0/24 in the above example. It's all in the exports(5) man page.
Other solutions were to make sure your hostname was defined (if you used hostnames instead of IPs) and that your nfs client and server ports were open on the client and server, respectively. You may want to disable the firewall during setup and testing until it's working.
I can see that i'm not the only one having madness issues with permission denined when mounting.
I'm not using direct NFS. If i use it there is no problem.
I'm using something between called GVFS. GVFS has the ability to change mount a directory which has one owner and convert it to another that has another owner! Basicly is about uid/gid conversion within mounts.
I'll always have permission denieds!!
I have tried everything!!
Can you try to help me out... I'm just desperating:
This is what i have:
This is my filesystem:
ls -la /sfa/
drwxrwxrwx 3 ul13 ul13 4096 Jan 31 19:30 ul13
ls -la /exports/home/sfa
drwxrwxrwx 2 sfa sfa 4096 Feb 5 22:16 ul13
This is my config:
Modification to init.d/nfs (to make it listen to port 33333) --- Atention! Altough i'm a gentoo user at home, this project involves the use rocks cluster platform. im just trying to get help in my favorite linux forum!
U=$1 # LOGIC USER
N=$2 # NFSD UDP PORT
M=$3 # MOUNTD UDP PORT
S=$4 # SERVER PRIVATE IP WHICH RUNS PNFSN1
/opt/mc/bin/gvfs.mountd -f /etc/gvfs/n2_exports_mountd.ul$U -V 2 -P $M -O 33333 -t udp -H $S
/opt/mc/bin/gvfs.nfsd -f /etc/gvfs/n2_exports_nfsd.ul$U -V 2 -P $N -O 2049 -t udp -H $S
script to make the mount (cnfs.sh)
O=$1 # LOGIC USER
D=$2 # LOGIC USER IN DESTINY
N=$3 # GVFS.NFSD UDP PORT
M=$4 # GVFS.MOUNTD UDP PORT
S=$5 # SERVER PRIVATE IP
mount -t nfs -o port=$N,mountport=$M,vers=2,mountvers=2,udp $S:/export/home/sfa/ul$O /sfa/ul$D
sh /opt/mc/scripts/pnfsn2_test.sh 13 52611 51611 localhost
sh /opt/mc/scripts/cnfs.sh 13 13 52611 51611 localhost
mount: localhost:/export/home/sfa/ul13 failed, reason given by server: Permission denied