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.

    • Offizieller Beitrag

    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 7.0-32 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.9 | compose 7.0.9 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • 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.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!