Im trying to setup a samba share. I want the share to have access rights rwxrwsrws so that everyone can red and write to it. The folder shared on the server where the share resides is sat by chmod 777 to rwxrwsrws.The folder on the client computer has also been sat by chmod 777 to rwxrwsrws, but as soon as I map that folder to the share the permissions are changed to rwxr x r x when I view it by ls -l and I can't write to the maped folder by using a user that's different from the owner.Here's what I have done so far:Installed samba on a serverSat 777 on the folder /data by chmod 777 and shared it by sambaOn the client computer sat 777 on a folder /data (by chmod 777)Mapped this folder to the share on the serverThis is how I have configured the samba share:[global]security = userunix extensions = nomap to guest = Bad Userpublic = yesguest account = nobody[public]path = /disk2/dataguest ok = yeswritable = yesbrowsable = yespublic = yesdirectory mask = 0777directory security mask = 0777force directory mode = 0777force directory security mode = 0777hide dot files = noThis is how I have mapped the folder to the share on the client computer:Sudo mount t cifs //xx.xx.xx.xx/public /data o user=nobody
Can't set correct permissions on share mapping
linux;samba
The directory that you have created and shared via SAMBA in the server is rwxrwsrws  and the directory you have created in Client is rwxrwsrws.But once you have mounted the share via sudo, that directory will become rwxr x r xSo ultimately you need to mount the samba share and then change the directory permission. # chmod -R 777 /data/Never mount network files as Root user.mount t cifs //xx.xx.xx.xx/public /data o user=nobodyFor permanent mount and auto permission change.Add this in /etc/fstab//xx.xx.xx.xx/public /data cifs username=nobody,network,iocharset=utf8,file_mode=0777,dir_mode=0777,nopermNote: Also keep in mind that cifs is supposed to be for user mounts not entire systems. It basically assumes you will be mounting 1 user on this side to 1 user on that side