I have a local server with shares for the local computers to backup stuff on.
The server has a backupuser(1002:1002).
The client has the user alex(1000:1000) who is also in the backupuser(1002) group on that machine.
For the purpose of finding the error I am logged in as backupuser in the snippets.
Sometimes (with chmod 777) I can edit the test file with nano and sometimes not, sometimes it works on the second try. So there is definetly something fishy here.

The plan is for the user alex to be able to have full access to the content of folder snapraid_ignored.

Server is running Proxmox and the client is running Antergos Gnome.

Server /etc/exports

/home/fileserver/storagepool               192.168.1.24(fsid=1,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/home/fileserver/storagepool               192.168.1.24(fsid=1,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/home/fileserver/storagepool/kodi          192.168.1.24(fsid=2,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/home/fileserver/storagepool/Upload        192.168.1.24(fsid=3,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/media/pool/disk6/Seafile                  192.168.1.24(fsid=4,async,rw,no_subtree_check,all_squash,anonuid=1007,anongid=1000)
/home/fileserver/storagepool/test          192.168.1.24(fsid=5,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/home/fileserver/storagepool/music         192.168.1.24(fsid=6,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/home/fileserver/snapraid_logs             192.168.1.24(fsid=7,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/media/pool/disk1                          192.168.1.24(fsid=8,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/media/pool/disk2                          192.168.1.24(fsid=9,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/media/pool/disk3                          192.168.1.24(fsid=10,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/media/pool/disk4                          192.168.1.24(fsid=11,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/media/pool/disk5                          192.168.1.24(fsid=12,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/media/pool/disk6                          192.168.1.24(fsid=13,async,rw,no_subtree_check,all_squash,anonuid=1000,anongid=1000)
/home/fileserver/storagepool/Backups_external/snapraid_ignored 192.168.1.24(fsid=14,async,rw,no_subtree_check,all_squash,anonuid=1002,anongid=1002)
#/home/fileserver/storagepool/Backups_external/snapraid_ignored 192.168.1.24(fsid=14,async,rw,no_subtree_check)
/home/fileserver/storagepool/surveillance  192.168.1.24(fsid=15,async,rw,no_subtree_check,all_squash,anonuid=1001,anongid=1000)

Client /etc/autofs/auto.master

/nfs /etc/autofs/auto.myshares --ghost
/nfs/rpiradio /etc/autofs/auto.rpiradio --ghost
/nfs/torrent /etc/autofs/auto.torrent --ghost
/nfs/proxmox /etc/autofs/auto.proxmox --ghost
/nfs/terraria /etc/autofs/auto.terraria --ghost
/nfs/web14 /etc/autofs/auto.web14 --ghost
/nfs/web16 /etc/autofs/auto.web16 --ghost
/nfs/quake /etc/autofs/auto.quake --ghost

/net    -hosts

+dir:/etc/autofs/auto.master.d
+auto.master

Client /etc/autofs/auto.proxmox

kodi                    -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/fileserver/storagepool/kodi
test                    -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/fileserver/storagepool/test
music                   -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/fileserver/storagepool/music
upload                  -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/fileserver/storagepool/Upload
backup                  -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/fileserver/storagepool/Backups_external/snapraid_ignored
homeassistant           -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/homeassistant
surveillance            -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/fileserver/storagepool/surveillance
seafile                 -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/media/pool/disk6/Seafile
snapraid_logs           -rw,soft,intr,rsize=8192,wsize=8192   192.168.1.10:/home/fileserver/snapraid_logs

Server:

root@pve:/home/fileserver/storagepool/Backups_external/snapraid_ignored# id backupuser
uid=1002(backupuser) gid=1002(backupuser) groups=1002(backupuser)
root@pve:/home/fileserver/storagepool/Backups_external/snapraid_ignored# ls -l
total 20
drwxrwxr-x 9 backupuser backupuser 4096 Jul 24  2016 Alex Dator
drwxrwxr-x 3 backupuser backupuser 4096 Jul 18 15:27 piRadio
drwxrwxr-x 3 backupuser backupuser 4096 Jul 18 15:37 Tbox
-rwxrwxr-x 1 backupuser backupuser    2 Aug  7 17:24 test
drwxrwxr-x 4 backupuser backupuser 4096 Oct 20  2017 Ubuntu

Client:

[backupuser@AlexStora backup]$ id backupuser
uid=1002(backupuser) gid=1002(backupuser) grupper=1002(backupuser),998(wheel)
[backupuser@AlexStora backup]$ id alex
uid=1000(alex) gid=985(users) grupper=985(users),1002(backupuser)
[backupuser@AlexStora backup]$ ls -l
totalt 20
drwxrwxr-x 9 backupuser backupuser 4096 24 jul  2016 'Alex Dator'
drwxrwxr-x 3 backupuser backupuser 4096 18 jul 15.27  piRadio
drwxrwxr-x 3 backupuser backupuser 4096 18 jul 15.37  Tbox
-rwxrwxrwx 1 backupuser backupuser    3  7 aug 18.24  test
drwxrwxr-x 4 backupuser backupuser 4096 20 okt  2017  Ubuntu
[backupuser@AlexStora backup]$ mv test test2
mv: kan inte flytta 'test' till 'test2': Åtkomst nekas
[backupuser@AlexStora backup]$ mkdir testfolder
mkdir: kan inte skapa katalog ”testfolder”: Åtkomst nekas

I test write access by trying to edit the test file with nano, or by trying to rename it with mv.

A similar question here suggested to try with lsattr:

root@pve:/home/fileserver/storagepool/Backups_external/snapraid_ignored# lsattr
--------------e---- ./Ubuntu
--------------e---- ./piRadio
--------------e---- ./Tbox
--------------e---- ./test
--------------e---- ./Alex Dator

Edit

It works well when I ssh into my Raspberry Pi, I can add and edit on the share. I use this in the /etc/fstab.

192.168.1.10:/home/fileserver/storagepool/Backups_external/snapraid_ignored   /media/backup_on_server    nfs   _netdev,auto,noatime,nolock,bg,intr,tcp,actimeo=1800 0 0

On the Raspberry Pi I have no backupuser, I do everything as the user pi.
So I did the same thing on the machine I am trying to get this to work on. I added the same line in fstab. I also removed the backupuser user and group and removed myself from it.
It made no difference.

up vote 0 down vote accepted

I am not sure why it worked but changning the ownership of /home/fileserver/storagepool/Backups_external/ to backupuser:fileserver (instead of backupuser:backupuser) worked. I can now add, delete and edit files on the server from my computer.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.