QNAP-NAS / git clone on NFS share not working
I'm using a QNAP NAS as storage server for my Ubuntu home directory. Everything seems to work fine, so far I did not encounter any problems with file permissions. The output line of mount is:
192.168.0.200:/homes/myuser on /home/myuser type nfs (rw,relatime,vers=3,rsize=524288,wsize=524288,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,mountaddr=192.168.0.200,mountvers=3,mountport=30000,mountproto=udp,local_lock=none,addr=192.168.0.200)
However, when I try to clone a git repository into my home directory, I get the following output and error messages:
myuser@ubuntu ~/test % git clone -v https://github.com/robbyrussell/oh-my-zsh.git
Cloning into 'oh-my-zsh'...
POST git-upload-pack (140 bytes)
remote: Counting objects: 17463, done.
fatal: Unable to create temporary file '/home/myuser/test/oh-my-zsh/.git/objects/pack/tmp_pack_XXXXXX': Permission denied
fatal: index-pack failed
After running the command, the directory test doesn't even contain a subdirectory named oh-my-zsh
. It is still empty.
getfacl of the directory /home/myuser/test/
shows the following output:
myuser@ubuntu ~/test % getfacl .
# file: .
# owner: myuser
# group: mygroup
user::rwx
user:nobody:---
user: myuser:rwx
group::rwx
mask::rwx
other::---
default:user::rwx
default:user:nobody:---
default:user: myuser:rwx
default:group::rwx
default:mask::rwx
default:other::---
So actually there should be no permission problems, as myuser has all permissions on the directory. So is there something permission-related that I am missing? Or is this a NFS-related problem and how can I solve this?
Same problem. I guess there's 2 ways.
- Turn off Advanced ACL in QNAP-NAS. Go to Control Panel > Privilege > Shared Folders > Advanced Permissions > Uncheck [] Enable Advanced Folder Permissions
or
-
Add
noacl
option in/etc/fstab
like follows. Options may differ depending on your preferences.192.168.0.200:/homes/myuser /home/myuser nfs defaults,_netdev,noacl 1 2
I did the latter and it worked.
Edit: If you want to keep using advanced ACL, make sure that NFSv4 is active on your NAS. NFSv4 supports ACL, but NFSv3 probably not.
Edit: I don't recommend the first way. I tried it, and it resulted in a nightmare. All permissions were overwritten, folders 777, files 666. So you should leave the NAS option as it is now, and change client's NFS config only.