SMB share permissions different when mounted in Ubuntu vs inside OMV

  • Hi all,

    I am on OMV 5.6.23-1 and I have created a shared folder that have the following ACL

    owner: root , rwx

    group: users, rwx

    others: rw


    When I ssh into where OMV is running, I can see the permissions on all the files and folders of my shared folder match the above.


    I created an SMB/CIFS share for this folder that has Guests allowed and the rest of the options set to default. I can access it within Windows 10 without any issues by using my username and I can create files/folders. Inside OMW I have two users added: myself, and qbittorrent-nox. Both are part of the users and sambashare group.


    When I manually mount this SMB/CIFS share in my Ubuntu LXC, the permissions of all the files and folders is different. Everything is set to owner and group root like so: drwxr-xr-x 2 root root


    Because of this, my qbittorrent-nox user cannot write new files into the folder. What could cause them to be different and what can I try? This is the command I am using to mount: mount -t cifs -o username=myUserName //omvServer/smbShare /mnt/smbShare

    • Offizieller Beitrag

    I created an SMB/CIFS share for this folder that has Guests allowed and the rest of the options set to default. I can access it within Windows 10 without any issues by using my username and I can create files/folders. Inside OMW I have two users added: myself, and qbittorrent-nox. Both are part of the users and sambashare group.

    This shows that the share is properly configured. So the problem is probably here:

    mount -t cifs -o username=myUserName //omvServer/smbShare /mnt/smbShare

    I would check the mount options on ubuntu.

    • Offizieller Beitrag

    When I manually mount this SMB/CIFS share in my Ubuntu LXC

    How did you do this on your Ubuntu? I had a similar issue on my Debian machine. When I mounted a SMB share from OMV to my desktop the ownership/permissions of the mount point would change after it mounted, no matter what chmod and chown I used to set up the mount location.

  • Owner and Group will be determined by the uid=me,gid=my_group parameter you give to the mount command , somtimes you have to use the nounix flag as well to explicitly tell that uid and guid should be used. instead of what the server provides.


    As long as you do not have a central user management solution in place, uids will be different on different clients, so you most often will not want that.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

    • Offizieller Beitrag

    The line of code that I added to /etc/fstab was //192.168.1.140/media /mnt/samba cifs username=myuser,password=mypassword,file_mode=0666,dir_mode=0777 0 0


    The file_mode and dir_mode is what I had to add to make it work.

    System Backup Typo alert: Under the Linux section the command should be sudo umount /dev/sda1 NOT sudo unmount /dev/sda1

    Backup Data Disk to Backup Disk on Same Machine: In a Scheduled Job:rsync -av --delete /srv/dev-disk-by-uuid-f8814ed9-9a5c-4e1c-8830-426968c20ea3/ /srv/dev-disk-by-uuid-e67439d5-00a3-4942-bd5f-b84ab86aa850/ Don't forget trailing slashes, and BE CAREFUL. (HT: Getting Started with OMV5)

    Equipment - Thinkserver TS140, NanoPi M4 (v.1), Odroid XU4 (Using DietPi): PiHole

Jetzt mitmachen!

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