Page 1 of 1

subfolder access denied (nfs mount ok)

Posted: Mon May 25, 2020 10:59 pm
by LordValen
On the TS-251A I created several shared folders (nfs and smb) and for NFS I enabled nfs v2+3+4
For the shared folder permissions, I set an host IP, rw, no_root_squash.

Mounting the nfs from my Ubuntu client works fine, but when I want to go into a subfolder it says "permission denied".

I once had asimilar issue with smb: I was able to access the share but no subfolders - but the special option "apply and reset for all files and subfolders" corrected it.
The special option is anyways only in the user/group selection, there is no equivalent option in the "NFS host access" selection.

How can the NFS access to subfolders of NFS shares be enabled?

Re: subfolder access denied (nfs mount ok)

Posted: Tue May 26, 2020 9:19 pm
by LordValen
Some details:
#1 Since most folders (and files) were created some time ago by the default NAS user (admin/root), the folder owner is root (and the group is admin).
#2 I tested the nfs access to another folder whose owner is <empty> (in the GUI, 500 in the terminal), the group is user.
Both folders have the permission 770.

#2 can be accessed via nfs no matter the options (no_root_squash, root_shash etc), #1never works.
In other words: a NAS folder owned by root can never be accessed via NFS. (maybe unless the IDs match exactly between remote and local root user. I haven't tried this)

=> several questions:
1. The OWNER of ALL the folders on the NAS has no real importance at all?
Because the access rights are managed anyways via the NAS users.
- Via smb the user credentials are entered with mount, and even with the non-admin users/groups, the folder #1 CAN BE accessed
- Via nfs, ALL the folder should better have a non-admin user/group (I don't see any benefit with SHARED folders and subfolders belonging to root)

2. In the NAS GUI, however, there is NO WAY to change the owner of multiple, nor recursively?
I cannot even set the owner to nobody or <empty>. I always have to chose a NAS user.

3. Changing the owner+group via a Terminal on the NAS (and recursively for all subfolders and files), it should have no impact to the current shares (smb or nfs) or anything else?

Re: subfolder access denied (nfs mount ok)

Posted: Fri May 29, 2020 4:45 pm
by LordValen
I asked the QNAP support for answers, and sadly the answers had nothing to do with the questions.

They sent an image of the smb gui options, instead of explaining why their gui does not allow more nfs options, especially concerning the file/folder owners.

What a shame