0

I am using Linux Mint 13.

There is a folder on a local network which I'm mapping to a local mount point with nfs, like so:

sudo mount.nfs -rw 192.168.18.13:/volume1/resource_library /mnt/resource_library_writeable

If I then create a new folder called "foo" inside this directory, using my desktop tools (so not sudo-ing), it has no permissions:

$ ls -l  /mnt/resource_library_writeable
....
drwxr-xr-x  3 1024 users 4096 May 12 14:05 flute and clarinet
d---------  2 1024 users 4096 Oct 25 12:25 foo
drwxrwxr-x 39 1024 users 4096 May 19 10:17 general
....

I've shown a couple of its sibling folders here.

My username is max, and group is max. The username and group on these folders are "1024" and "users", respectively.

If I log onto the source drive with ssh, then "users" is the groupname there too (and the user is the one I log in as, which isn't 1024). So, i suppose that the nfs connection logs me in as user 1024, maybe?

Is there something else I need to do when I mount it to make it so that I can edit it normally, as if it was a regular folder?

EDIT: as requested, the /etc/exports file on the source host

$ sudo cat /etc/exports
/volume1/NAS    192.168.18.0/24(ro,async,no_wdelay,root_squash,insecure_locks,sec=sys,anonuid=1025,anongid=100)
/volume1/resource_library   192.168.18.1/24(rw,async,no_wdelay,insecure,all_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)
/volume1/web    192.168.18.1/24(rw,async,no_wdelay,insecure,all_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)
/volume1/resource_library   192.168.18.1/24(ro,async,no_wdelay,insecure,all_squash,insecure_locks,sec=sys,anonuid=1024,anongid=100)
  • 1
    Can you show us the /etc/exports file on 192.168.18.13? – Mark Plotnick Oct 25 '17 at 12:38
  • Your server's export list has the all_squash and anonuid=1024,anongid=100 options. If you can explain what kind of access you'd like remote users to have, we can help you pick the appropriate options. Run man exports to see what each option does. – Mark Plotnick Oct 25 '17 at 16:16
  • Thanks Mark. I'm the only user connecting via linux. A few other users connect on Windows and Mac via SMB. The main thing I want is for all files and folders I create, outside of sudo mode, to have 775 permissions. thanks! – Max Williams Oct 26 '17 at 8:10
  • 1
    I can't explain how the mount and exports options you have would result in a directory being created with 000 permissions. Does directory foo have those same permissions if you ls it while logged into the server? – Mark Plotnick Oct 26 '17 at 13:52
  • 1
    If you don't need all_squash, remove it. When present, it makes all remote users, regardless of uid and gid, get mapped to the anon uid and gid. The option is useful if you want all remote users to have the same access to files and directories on the filesystem, but it looks like that's not what you want. But check with the person who added that option. – Mark Plotnick Oct 26 '17 at 13:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.