1

new with linux permissions and I'm having an issue on write between my fileserver (192.168.1.1, debian) and my new nextcloud instance (192.168.1.2, ubuntu) on the file server side:
exportfs
/mnt/storage/cloud 192.168.1.2(rw,sync,no_root_squash,insecure,no_subtree_check,fsid=1)

on the nextcloud instance
sudo mount -t nfs 192.168.1.1:/mnt/storage/cloud/ /mnt/cloud/

permissions on /mnt/storage/cloud on the server:

ls -l /mnt/storage/ drwxrwxr-x   3 nicola nicola    20 Dec  5 11:15 cloud

users involved
fileserver:
id nicola uid=1000(nicola) gid=1000(nicola)groups=1000(nicola),24(cdrom),25(floppy),29(audio),30(dip),44(video),46(plugdev),109(netdev),998(docker),1001(dockeruser)

id www-data uid=33(www-data) gid=33(www-data) groups=33(www-data),1000(nicola)

nextcloud:
id www-data uid=33(www-data) gid=33(www-data) groups=33(www-data),1000(nicola)

as user www-data on nextcloud instance is in group 1000 (nicola), and that group is the group owner of the directory on the fileserver I suppose I can write with that user on the fileserver /mnt/storage/cloud directory, instead when i test

sudo -u www-data touch /mnt/cloud/test-www.txt touch: cannot touch '/mnt/cloud/test-www.txt': Permission denied

what am I missing here?

Thanks in advance for your reply.

1
  • Can you try making the directory world-writable and create a file that way and see what user owns the file? You probably have the same problem as me: despite the export's settings (no_root_squash in your case, anonuid/anongid in mine), users are squashed to nobody. I'm curious whether you have a similar issue. Unfortunately, I have no solution, and my Server Fault question is unanswered. Even more annoying is that I have the very same config on other server and it works as expected.
    – MegaBrutal
    Jan 29, 2022 at 23:48

0

You must log in to answer this question.

Browse other questions tagged .