Ubuntu – How to let smb share mount via fstab assign full permission to new created file or directory

cifsfstabpermissionssambashared-folders

How can we fstab mount a samba share that give permission 0777 (to every samba users in the write list) for new created directory or files? E.g. I created a new directory in client PC (Ubuntu 12.10), and want the directory to have permission drwxrwxrwx in the server (Ubuntu 12.04 LTS).

dir_mode=0777,file_mode=0777 already been set in the fstab, still no effect. I can read/write the mounted smb share, but other users in the write list cannot write to the new directory created by me. The permissions in server is always drwxr-xr-x.

Other option that I have tried 'nounix', 'noperm','uid'. But still cannot get it work.

Any idea?

Best Answer

You can use the next configuration (for example):

[site-red$]
   comment = Users profiles
   path = /var/www/site-red
   guest ok = no
   valid users = josecarlos yovany
   admin users = josecarlos yovany
   browseable = yes
   create mask = 0600
   directory mask = 0700
   write list = josecarlos yovany
   force group = www-data
   force user = www-data

I hope help you ;-)