Operating System - Linux
1748180 Members
4032 Online
108759 Solutions
New Discussion юеВ

Re: NFS mount point permission denied

 
SOLVED
Go to solution
monu_1
Regular Advisor

NFS mount point permission denied

Hello All,

i have nfs server(i.e 192.168.0.2) having few portion of shared like /home/software. when a system in network (i.e. 192.168.0.4) mount that portion as a root in /mnt.
#cd /mnt
-bash: cd: /mnt: Permission denied
#ls -la /
drwx------ 2 mysql mysql 4096 Sep 22 16:31 mnt

my prob is ===> why is it showing mysql owner?

Pls suggest!

Thanks
MKS


12 REPLIES 12
Rob Leadbeater
Honored Contributor

Re: NFS mount point permission denied

Hi,

Maybe someone did

# chown mysql:mysql /mnt

for some reason...

Cheers,

Rob
Ivan Ferreira
Honored Contributor

Re: NFS mount point permission denied

If you umount the file system, who is the owner for /mnt? Do you have in sync the UID/GID information between the NFS server and NFS client?
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
monu_1
Regular Advisor

Re: NFS mount point permission denied

Hi Ivan, Rob,
Thanks for quick reply.

Rob, when i mount it another location it also display same owner n group(mysql).

Ivan, when i umount /mnt then it display root owner n group.
Thanks,
MKS


monu_1
Regular Advisor

Re: NFS mount point permission denied

Hi,
below is NFS sever exports entry.
# cd /proc/fs/nfs
#vi exports
# Version 1.1
# Path Client(Flags) # IPs
/home/software 192.168.0.4(rw,root_squash,sync,wdelay,no_subtree_check,uuid=166e87a6:e3cc4c24:aaa1064c:4b53622d)
monu_1
Regular Advisor

Re: NFS mount point permission denied

Hi Ivan,

>Do you have in sync the UID/GID information between the NFS server and NFS client?

How can we sycn client n server?

Thanks,
MKS
Ivan Ferreira
Honored Contributor

Re: NFS mount point permission denied

Check the if the UID/GID information is consistent between the server and the client. If UID=500 is mysql on client, should be on server.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
monu_1
Regular Advisor

Re: NFS mount point permission denied

Hi Ivan,

I so confused why mysql is coming here? I think there is no role of mysql user.
And why mysql getting ownership after mounting that portion of server where as i m mountnig as a root on cleint?

Thanks,
MKS
monu_1
Regular Advisor

Re: NFS mount point permission denied

Hi Ivan,

I just check that mysql id on client n sever are different.
Server:
# id mysql
uid=27(mysql) gid=27(mysql) groups=27(mysql)

Client:
# id mysql
uid=501(mysql) gid=501(mysql) groups=501(mysql)

Thanks,
MKS
Ivan Ferreira
Honored Contributor
Solution

Re: NFS mount point permission denied

Linux handles ownership by UID/GID and not username/groupname.

So in the server, the exported directory is owned by UID=501, I don't know which user is, but when you mount on the client, it looks like the owner is mysql, because uid=501 on client is mysql.

It does not matter who mounts the directory, the owner is as established in the exported directory. That is why UID/GID information must be consistent between server and client.

Remember to keep asigning points!
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?