[Samba] [PARTIALLY SOLVED] SAMBA shares are READ ONLY to normal users

Kanito 73 kanito73 at hotmail.com
Thu Jan 14 16:18:54 UTC 2021


Hello friends

I have partially solved the problem (samba mounts only writable for root).  It was not the "read only" or the "writable" settings or the server directories permissions. By default the mount (cifs) command mounts the samba shares using uid=0 gid=0, no matter what user is specified, at least on my computers.

So, the plain command

   mount -t cifs //host/share /mnt/share

or

   mount -t cifs -o username=some_user //host/share /mnt/share

does not work at least on my computers with Debian 10. Just to try I mounted forcing uid and gid to the correct values for my user and the shares have now full read/write access.


NEW PROBLEM

Some tutorials show how to use a .credentials file and add the samba shares to fstab using a special user (without login and home directory) only for samba service, but since the uid/gid are always set to zero (root) it would require anyway to force them to the correct values. No problem when mounting manually by command line, but WHAT WILL HAPPEN WITH *WINDOWS* CLIENTS that ask only for a password but not a uid/gid (and Windows should not take care or that)?

By now I can use the shares in Linux mounting and specifying uid/gid manually, but I need the mount command to use the correct uid/gid on the samba server or NOT TO SPECIFY UID/GID and let the server to assign it according to the username. Is it possible? Am I doing something wrong? I don't know why 'mount' always sets uid/gid to 0.


Thanks again!


More information about the samba mailing list