Shared Folder (inside user dir) permissions problem with virtualbox (ubuntu server)

    • OMV 2.x
    • Resolved
    • Shared Folder (inside user dir) permissions problem with virtualbox (ubuntu server)

      I'm running a virtual server (ubuntu server) inside virtualbox and have a webserver running on the ubuntu server.

      I want only to allow the ubuntu server to access the share and also only the specific user through the samba shared folder. I've got it all working but apache 2 on the virtual machine is running into trouble not being able to write to the shared folder.

      this is how I'm mounting the share in my virtual machine is my /etc/fstab
      //%openmediavaultip%/%username% /media/%username% cifs credentials=/home/%username%/.smbcredentials,gid=33,file_mode=0770,dir_mode=0770,iocharset=utf8,sec=ntlm 0 0

      gid 33 is www-data

      I'm probably going about this in the wrong way and I would like some suggestions on how to better approach this. I've tried putting the file and directory mode to 777 but this also not seems to be working (which I in any case do not want)

      I've tried doing this through the virtualbox shared folder options but was running into issue with that as well. Any suggestions are appreciated.
    • Is www-data the owner of the files on the OMV box? What is the output of mount when the share is mount? Can you sudo to the www-data and try writing a file to the share to see what error you are getting? You could turn logging on and the debug output up for samba to see why as well.


      Personally, I would use NFS instead of samba.
      omv 4.1.15 arrakis | 64 bit | 4.15 proxmox kernel | omvextrasorg 4.1.13
      omv-extras.org plugins source code and issue tracker - github

      Please read this before posting a question and this and this for docker questions.
      Please don't PM for support... Too many PMs!
    • clooner wrote:

      this is how I'm mounting the share in my virtual machine is my /etc/fstab
      //%openmediavaultip%/%username% /media/%username% cifs credentials=/home/%username%/.smbcredentials,gid=33,file_mode=0770,dir_mode=0770,iocharset=utf8,sec=ntlm 0 0

      gid 33 is www-data

      I'm probably going about this in the wrong way and I would like some suggestions on how to better approach this. I've tried putting the file and directory mode to 777 but this also not seems to be working (which I in any case do not want)


      Thanks for the quick reply. I'm accessing the share from a windows machine that writes and reads files to this, also the virtualmachine that writes and reads files from it. I can access the share from both the the ubuntu server and the windows machine. The problem is when apache (php) tries to write a file to the share, it fails because it does not have the permission.