Jump to content

NFS mount ignored owner and file permission


Recommended Posts

I have Unraid 6.5.1  nfs mounted on CentOS 6.5, I can set ownership and file permission on mounted NFS on client, however any user is to able to delete or modified regardless the ownership and permission on the file. I am missing anything Unraid NFS configuration?

Link to comment

Here is the exports and exportfs -v   NFS share is private 

 

In the test below, I can remove file and directory own by root.

 

exports

# See exports(5) for a description.
# This file contains a list of all directories exported to other computers.
# It is used by rpc.nfsd and rpc.mountd.

"/mnt/user/Backups" -async,no_subtree_check,fsid=104 192.168.15.0/24(sec=sys,rw,no_root_squash,insecure,acl)


exportfs -v

/mnt/user/Backups
                192.168.15.0/24(rw,async,wdelay,hide,no_subtree_check,fsid=104,sec=sys,insecure,no_root_squash,no_all_squash)


mount fstab

sun:/mnt/user/Backups/Servers/earth     /net_backup             nfs     defaults        1 2

 

 

The test directory is own by root but I can remove the directory with regular user.

[ken@earth net_backup]$ ls -tlr
total 0
drwx------ 1 root root 0 May  5 07:27 test
[ken@earth net_backup]$ rm -rf test
[ken@earth net_backup]$
 

Edited by Ken Huang
Link to comment

Hmm. tried it and you are correct... this is probably a bug with the user shares.

I can't shutdown my array for a while, but if you have disk shares enabled, try creating an NFS share there and doing the same tests there.

Feel free to create a defect report.

Link to comment
  • 7 months later...

Any updates on this? I experience the same thing with my unassigned device share and I am heavily dependent on the system accepting the user/group permissions - right now everybody get access to r/w and completely ignoring the file permissions.

 

I know I can specify them myself in the exports file, but it get overwritten every time I do an update with any NFS share in unraid GUI, which is quite annoying. Any simple solution to either keep very specific rules to apply, or making it care about the permissions?

 

It magically worked anyway, dunno what happened.

Edited by olehj
Invalid comment
Link to comment
  • 1 year later...
  • 1 year later...

I'm also seeing this same behavior, Unraid 6.9.2, Centos 8 stream nfs client.

 

The share can be mounted and all the file permissions are correct on both the server and client. I can also create files with the proper permissions based on the user on the client.

 

But the user can then do anything as if permissions were totally open.

 

Anyone solved this?

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...