[Solved] Mounting smb with CIFS ignores file_mode and dir_mode

Tasos Stamadianos Asks: Mounting smb with CIFS ignores file_mode and dir_mode
I’m having trouble with permissions involving an SMB share hosted on another machine on my local network. It appears that no matter what options I provide in the /etc/fstab or in a mount command, ls -l always yields:


Here’s the current /etc/fstab entry:

//this-is-my-server.local/share-folder    /mnt/smb    cifs    credentials=<some-cred-file>,uid=0,gid=100,file_mode=0775,dir_mode=0775    0    4

Here’s the aforementioned (and redacted) credentials file:


Here’s the smb.conf share configuration on the hosting server:

   path = /some/path
   browseable = yes
   writeable = yes
   create mask = 0775
   directory mask = 0775

To clarify, I can mount the share just fine, but I cannot write or create any files without sudo on the Pi. Note that a Windows machine which has the drive mapped can write and create files just fine.

Am I missing something in my setup here? Or, are the directory and file permissions being overridden elsewhere?

Edit: Running Raspbian 8 on a RasberryPi 3.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.