Cannot access NFS exported share

I exported my backup partition with NFS. I struggled some hours with setting the uid and gid, finally I ended up adding the Linux client to the group with gid = . However, I still cannot access the urbackup directories with permission 750:

~$ ls -ld /data/storage/urbackup/clients
drwxr-x— 1 urbackup whoopsie 8 Mar 3 04:10 /data/storage/urbackup/clients

~$ id
uid=1000(zsolt) gid=1000(zsolt) groups=1000(zsolt),4(adm),20(dialout),24(cdrom),27(sudo),30(dip),46(plugdev),108(lpadmin),110(whoopsie),124(sambashare)

~$ ls /data/storage/urbackup/clients
ls: cannot open directory /data/storage/urbackup/clients: Permission denied

Can somebody explain this??

many thanks,

[quote=“gkzsolt”]~$ ls -ld /data/storage/urbackup/clients
drwxr-x— 1 urbackup whoopsie 8 Mar 3 04:10 /data/storage/urbackup/clients[/quote]

The commands shows that you have this directory set to a group owned by whoopsie (believe this is incorect as whoopsie handles crash reports and has nothing to do with urbackup or NFS)

In saying this your user is part of the whoopsie group so it still should have worked so…

make sure the higher level directories ie…

/data/storage/urbackup
/data/storage
/data/

have access for the whoopsie group to be able to read & execute

Also SElinux might be causing issues somehow some way if you are running Linux.

[quote=“bjharper”][quote=“gkzsolt”]~$ ls -ld /data/storage/urbackup/clients
drwxr-x— 1 urbackup whoopsie 8 Mar 3 04:10 /data/storage/urbackup/clients[/quote]

The commands shows that you have this directory set to a group owned by whoopsie (believe this is incorect as whoopsie handles crash reports and has nothing to do with urbackup or NFS)[/quote]

This is not something I set up. It is due to the fact that NFS sends UIDs and GIDs over the network, as I understand it. On the NFS server, the directory is owned by group ‘urbackup’, with GID 110. On the client host, GID 110 corresponds to the group ‘whoopsie’, that’s why it is there. What I did is only that I added my user to that group, to have access to it. I don’t know if this is good or bad, I am quite inexperienced in NFS sharing, so you might have a better solution…

[quote=“”]make sure the higher level directories ie…

/data/storage/urbackup
/data/storage
/data/

have access for the whoopsie group to be able to read & execute
[/quote]

All these directories have a 755 permission, so, despite the different owners, everybody can read and execute (browse) there. Only the dir with setting 750 was problematic.

I managed to access it finally, however, with this setting in /etc/exports:

/data/storage     hostname(rw,sync,no_subtree_check,no_root_squash,insecure)

I struggled a lot with the

(rw,sync,no_subtree_check,all_squash,insecure,anonuid=1000,anongid=1000)

setting (with no success), and I could not understand how these are supposed to work?

Thanks for pointing out, it seems it is not installed on my system.

Cheers,

[quote=“gkzsolt”]I struggled a lot with the

Code: Select all
(rw,sync,no_subtree_check,all_squash,insecure,anonuid=1000,anongid=1000)[/quote]

This line will tell NFS to…

all_squash = Force all users to connect as the anonymous / nobody uid & gid
anonuid=1000 tells NFS the nobody UID is 1000
anongid-1000 tells NFS the nobody GID is 1000

So in essence this exported share will base its permissions on which ever user has UID/GID of 1000 on the server rather than the client. Im not sure what urbackups UID is on your server but its GID is 110 (Rather than 1000).

Thanks, bjharper.