Home-Share on NFS (via External Storage App)

Hello Community,

I try to achieve the following scenario:

  • Setup NextCloud latest on a VM
  • Connect it to a NFS-Share via External Storage App (Share is mounted locally on the FS, user www-data has access to it)
  • Write and read files with a user with the correct UID / GID on the Storage Provider (NAS)

I have setup everything so far.
The only thing is, that I cannot write and read the files with the “correct” user.
So my first idea was, that I can set the correct UID and GID of a user and it would be mapped correctly to the NFS-Share.

Question: Is there a way to set the GID / UID of the user that nextcloud uses to access the NFS-Share?
If I use AD / LDAP, is the problem solved then? Would that be the only way to achieve that?


Is it really correct. Can your Nextcloud user write? Test with this command (e.g. user www-data)
sudo -u www-data touch /path/to/your/nfs-share/testfile.txt
(touch creates an empty file here testfile.txt)

Good morning,

sorry for replying so late.
Yes, www-data can write.
The reason why I ask: If I mount a share with NFS, all files that will be created there via NextCloud are owned by www-data and I would like to set the correct UID of the user that I have on both sides.
@devnull, “Really Correct” means, that this is solved by using LDAP/AD? Maybe you can explain a little bit more in detail?


Correctly “Is it really correct?” belongs to your statement that you can write on the share. Therefor the test with “touch”.

Maybe you can search some examples with “nextcloud external storage nfs” in the internet.