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.
Notices
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have searched google and found many sites refering to " permission denied" when trying to mount an nfs partition in a client, but i haven't come up with a solution yet.
First i desabled my "firestarter" firewall in both the client and the server of my network (both server and client run Fedora Core 4):
Originally posted by Tinkster Maybe that's a RH specific extension ... I've never
seen an exports with
-maproot=0
before ... and man exports has no mention of that flag.
Cheers,
Tink
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
Code:
/var/ftp 10.0.0.3(rw,no_root_squash)
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:
/backup.local/ 10.0.0.13(rw,root_squash,sync)
/backup.local/ 10.0.0.*(rw,root_squash,sync)
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:
Code:
ls -la /sfa/
drwxrwxrwx 3 ul13 ul13 4096 Jan 31 19:30 ul13
Code:
ls -la /exports/home/sfa
drwxrwxrwx 2 sfa sfa 4096 Feb 5 22:16 ul13
This is my config:
/etc/exports
Code:
/export localhost.localdomain(rw)
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!
#!/bin/bash
# pnfsn2.sh
U=$1 # LOGIC USER
N=$2 # NFSD UDP PORT
M=$3 # MOUNTD UDP PORT
S=$4 # SERVER PRIVATE IP WHICH RUNS PNFSN1
# GVFS.mountd
/opt/mc/bin/gvfs.mountd -f /etc/gvfs/n2_exports_mountd.ul$U -V 2 -P $M -O 33333 -t udp -H $S
#GVFS.nfsd
/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)
Code:
#!/bin/bash
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.