Different access rights for Windows vs. Linux on same SMB share

Hi all,
I am running TrueNAS and exporting some shares via SMB. By accessing those shares from Windows Clients, all works as expected. However, mounting the shares into Ubuntu results in all files and folder being read only.

Example:
someuser@myhost:~$ ls -l /mnt/truenas/Bilder/
total 3953
drwxr-xr-x 2 root root 0 Jan 27 03:33 2000
drwxr-xr-x 2 root root 0 Jan 27 03:33 2002

Anyone any idea how to resolve this?

I am using follwing mount command:
mount -t cifs -o credentials=/home/someuser/nas-credentials.txt //someIPhere/Bilder /mnt/truenas/Bilder

Hi and welcome to the forums.

Could you try adding uid=1000 to your mount command replacing uid=1000 with the uid of your user.

If unix extensions aren’t in use (they haven’t been fully integrated into samba 4.20) then you should mount with noperm. This stops the kernel client from trying to ram Windows permissions into a less rich permissions model.

1 Like

Did not do the trick yet.

So I tried with “noperm”, but my xubuntu does not recognize this option and it is not listed on the man page either.

adding the uid and/or the uid and gid to the command still mounts the nas as read-only

my command looks like this:
sudo mount -t cifs -o uid=3000,gid=3000,credentials=/home/candahar/nas-credentials.txt //someIPhere/Bilder /mnt/truenas/Bilder

access rights show up as following:
someuser@jumphost:/mnt/truenas$ ls -l
total 0
drwxr-xr-x 2 3000 3000 0 Feb 1 10:26 Bilder

and

someuser@jumphost:/mnt/truenas/Bilder$ ls -l
total 3953
drwxr-xr-x 2 3000 3000 0 Jan 27 03:33 MyFolder

has it something todo with using sudo?

       perm   Client  does permission checks (vfs_permission check of uid and gid of the file against the mode and desired operation),
              Note that this is in addition to the normal ACL check on the target machine done by the server software. Client  permis‐
              sion checking is enabled by default.

       noperm Client  does  not do permission checks. This can expose files on this mount to access by other users on the local client
              system. It is typically only needed when the server supports the CIFS Unix Extensions but the UIDs/GIDs  on  the  client
              and  server  system do not match closely enough to allow access by the user doing the mount. Note that this does not af‐
              fect the normal ACL check on the target machine done by the server software (of the server ACL  against  the  user  name
              provided at mount time).

from mount.cifs manpage. Unless unix extensions are enabled you should generally ignore the POSIX mode bits the client shows.