Skip to main content

Troubleshooting Samba / Cifs share Permissions

Cifs share doesn't preserve permission configuration in smb.conf (755 instead of 777)

There are two options that can help 'save the day': dir_mode and file_mode. (placeholders in green italics) 
Setting both these to 0777 gives full permissions that the host smb server allows for the user in question.

sudo mount -t cifs -o rw,username=yourusername,dir_mode=0777,file_mode=0777 //share/directory ~/mnt/local/directory

Or if it s in your fstab file:

//192.168.1.234/Sharename /mnt/local/directory cifs username=yourusername,dir_mode=0777,file_mode=0777,password=yourpassword 0   0

 

 

Sources: 
https://www.linuxquestions.org/questions/linux-newbie-8/permission-denied-on-file-operations-on-mounted-cifs-share-4175661393/

https://superuser.com/questions/784362/cifs-share-doesnt-preserve-permission-configuration-in-smb-conf-775-instead-of