NFSv4 Permission Issues with Admin Users

0
0
Asked By TechWhiz42 On

I'm having a peculiar problem with my setup where a NAS serves a directory via NFSv4 to a server. The user 'gitea' (with UID and GID 5203) is present on both the NAS and Server, and the admin user is part of the 'gitea' group. The directory structure looks like this: /mnt/storage/ has 775 permissions with admin:admin, a.txt has 664 permissions with gitea:gitea, and the /mnt/storage/gitea/ directory has 775 permissions with gitea:gitea along with setgid. My issue is that while both admins can read and write to the a.txt file, they can't create new files in the gitea/ directory, which appears to have a conflicting permission setup. What am I missing in this scenario?

2 Answers

Answered By LinuxGuru88 On

It sounds like the issue could be tied to the gitea directory permissions. Since they are set to 775 (gitea:gitea), that means only users in the gitea group can write there. Admins won't have the write access since they're only part of the admin group. You could consider these options:

1. Add the admin users to the gitea group.
2. Change the permissions for 'others' (though that could pose a security risk).
3. Use Access Control Lists (ACLs) for more nuanced permission settings, but those can be a pain with NFSv4.
4. Change ownership to something like admin:gitea or gitea:admin. That might be the simplest route depending on your system setup.

Answered By SysAdminNinja On

You should also check if the UIDs and GIDs for the users on both the NAS and Server match. If they do, check the exact error message when an admin tries to create a file in the gitea directory—sometimes it helps to look at logs as well.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.