NFS mounts always as user nobody on Centos
Hi,
I want to use an NFS exported directory on a server aimed for FTP file upload. For this, the mounted NFS directory needs to have the same user/group as indicated in the FTP settings. However, the NFS share only mounts as user 'nobody', but I need user 'galaxy'. The FTP server is a virtual machine, running CentOS release 6.2 (Final). The NFS server is the host of the virtual machine, running Red Hat Enterprise Linux Server release 6.3 (Santiago). NFS is both version 4. On the NFS server The user: Code:
#id galaxy Code:
# cat /etc/exports Code:
# ll -d /mnt/galdb-bitsprod/database/ Code:
# service nfs status Code:
# service rpcidmapd status On the FTP server The user: Code:
# id galaxy Code:
# service rpcidmapd status Code:
# showmount -e nfsserver Code:
# cat /etc/fstab Code:
#mount /mnt/galaxydb What I have tried: - google :-) (actually, most of what I have already comes from this) - changed a bit the mount options in fstab: user, and users (but these are only setting the permissions of who can mount) Very often, the solution pops up in my head after writing so much down... Not this time unfortunately. Looking for some assistance here. Cheers! Joachim |
That is what the all_squash export option does.
Oh, I missed the anonuid options. Could you post your /etc/idmap.conf file? |
On the NFS server:
Code:
# cat /etc/idmapd.conf Code:
# cat /etc/idmapd.conf |
Ok, thanks for the hint to /etc/idmapd.conf.
I have changed both on the nfs server as on mounting server this line: Code:
[Mapping] Code:
[Mapping] Code:
# service rpcidmapd restart |
I was going to suggest changing the line:
#Domain = local.domain.edu to Domain=localdomain It is how mine is. The idmapd.conf manpage states: Quote:
|
Solved
Awfully lot of thanks! This made it! Now I feel more comfortable to dig into the man pages ;-)
So, in my cookbook, the main ingredients for success with NFS: 1. make sure ids on host and client are identical 2. make sure the domain names are correctly set |
For NFS4, you need all shares under an nfs root directory. This takes more work, using -bind or -rbind mounts, mounting one directory over another. Client mount commands (or the fstab entry) will use server:share instead of the full path.
Good Luck! |
Hello, I am having a similar problem. I have host server with all users' folders in one directory. When i mount the folder from a client server, I am getting all folders owned by "nobody". If I mention in the idmapd.conf file about NFSv4_gid_attr, I get the group that all the folders belong to. But I am getting all nobody for "owner". How do I set up for all the users (about 15 of them). I need HELP. Thanks in advance. Naz Husain
|
All times are GMT -5. The time now is 06:48 PM. |