NFS/SMB share for nextcloud on CentOS ESXi

John Doe

Guru
Joined
Aug 16, 2011
Messages
633
Hi folk,

I am stuck since almost a week, so I hope you can indicate me a way forward.

I have set up an ESXi with freenas VM.
that freenas has 2 pools, one with SSDs one with HDDs.
the pool with the SSDs is for vms, passed back to ESXi as NFS share.

So I set up centOS vm on ESXI, installed nextcloud and within CentOS I want to have nextcloud to write the data on the HDDs via NFS.
Nextcloud tells me, permission error.
Nextcloud is installed via apache.

Issue no#1
How do I tell nextcloud to get permission on /mnt/nextcloud within CentOS?
Probably it is related to the permissions on freenas nfs share.
As root (centos) I can write files.

Issue no#2
the same path for NFS share is also a SMB share.
When I write something on the share via CentOS root, it is working, but I do not see it via SMB as user desktop
If I write something from windows on SMB share, CentOS can see it via nfs.
I want to have it, that all smb users can see the content
 

John Doe

Guru
Joined
Aug 16, 2011
Messages
633
edit:
nfs share screenshot & smb share screenshot
 

Attachments

  • smb1.JPG
    smb1.JPG
    78.6 KB · Views: 388
  • fn1.JPG
    fn1.JPG
    65.4 KB · Views: 373

John Doe

Guru
Joined
Aug 16, 2011
Messages
633
No one any idea?

or is it too crazy written?
 

echelon5

Explorer
Joined
Apr 20, 2016
Messages
79
I don't have experience with your scenario, but I had something similar with Proxmox and accessing a NFS share that was also a SAMBA share. BTW I'm not experienced so take this with a grain of salt.

There are posts in the forum from experienced FN users that recommend you shouldn't mix the 2, exactly because you'll run into permission problems. I've mixed them but avoided writing through SAMBA - I've used SMB mostly as read-only.

In my scenario, I have a NFS share as a Proxmox backup destination which can be accessed through samba by windows hosts. In order to make it work I've first set the SAMBA share and ACLs, then I set the NFS share with mapall to root - maproot to root wasn't enough.

On your VM, you have to somehow mount the NFS share under user: www-data so that httpd can write to the folder. I don't know how to do this specifically with NFS, but with CIFS you specify the user in fstab. I believe CentOS comes with SElinux enabled so you also have to specify the context to allow httpd to write outside its folder (/mnt/nextcloud).
 
Last edited:
Top