I'm a linux user, with no previous experience of networking before getting a DNS-320, and I'm getting confused with permissions.
I've figured out how to mount a remote NAS directory on a mountpoint on my local system, but I can't get control over what access permissions that mounted directory then has.
For example, I create a local mountpoint, owned by 'localuser', with group rights set to 'localuser', and with 0755 permissions - ie. rwxr-xr-x.
The remote directory is called 'nasdir'; it's user is set to 'nobody', its group is 'allaccount', and it's access rights are 0777 (ie. rwxrwxrwx - anybody has read, write and execute permission), which makes sense at this stage, though these can be changed.
I also set up a user account on the NAS called 'nasuser', which alone has read/write permission to nasdir, which is added to the shares list.
This is the mount command I use:
mount -t cifs -o username=nasuser,password=password,uid=localuser,gid=localuser,file_mode=0644,dir_mode=0755 //192.168.0.30/nasdir /local/mountpoint
But the mountpoint gains 0777 rights, as do all directories subsequently created under it, or copied to it. Any user can write to it, which is not what I want.
I can change this by giving nasdir 0755 permissions within the NAS - but these permissions are relative to user 'nobody' and group 'allaccount', and although this /appears/ to give the mounted directory the permissions I want, in fact no local user (including root) then has write permissions, regardless of who the owner is set to.
I can understand this, because local settings shouldn't be able to override a remote limit on access. But surely the local system should be in control of which local user has access to a mounted directory when that directory is set to 0777?
Apologies for the length of post. Now, somebody please tell me I'm missing something childishly simple and obvious.