Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

To clarify on josecarlos answer, the change you are looking for is in the smb.conf file of the server (Ubuntu 12.04 according to your post).

The "create mask" and "directory mask" options are what you want to set 0777.

The reason is that your samba server has ultimate authority, even if you mount the share with 'nounix', 'noperm','uid' options on the client, this will not impact how samba (the server) will share these files and folders.

share|improve this 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 ;-)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.