Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a second drive on Ubuntu Server. The directory displays correctly but Windows users cannot write or create files on the directory. I have Samba set up so Windows can access the drives. here is the last bit of my /etc/samba/smb.conf

path = /media/windows
browsable = yes
guest ok = yes
writable = yes
read only = no
create mask = 0775
directory mask = 0775

I want the directory to be shared with writable permissions to everyone who can access the Ubuntu Server.

I have tried sudo chmod but to no success.

Any help would be appreciated

share|improve this question

I can see that you allow guests to access this share. So I believe you want to allow write access as well to everyone. If this is the case force Samba to act as a specific user and group for read / write access to this share:

path = /media/windows
browsable = yes
guest ok = yes
writable = yes
create mask = 0660
directory mask = 0770
force group = usergroup
force user = user

You should replace usergroup and user by the correct user group and user of your Linux box. Additionally take care to grant write access to this user/user group for the folder /media/windows :

# set owner of folder and all contents to user and usergroup
chown -R user:usergroup /media/windows

# find all directories in this folder and do a chmod 0777
find /media/windows -type d -exec chmod 0770 {} \;

# find all files in this folder and do a chmod 0660
find /media/windows -type f -exec chmod 0660 {} \;
share|improve this answer

chmod -Rf 777 /media/windows

chown -Rf root:users /media/windows

to create an accessable file you must config the /etc/exports

share|improve this answer

Your Answer


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.