Super User is a question and answer site for computer enthusiasts and power users. 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 try to setup a samba file server, but whatever I do I can't get write access to work (reading works fine). This is my current situation:

I have a local fileserver with 3 harddisks mounted at /mnt/share/disk<nr>. 2 of these use the ext4 filesystem, the third one is ntfs. This file server runs Fedora 18 32-bit. The root folders of these harddisks are owned by superman:superman, and testparm outputs the following:

workgroup = WORKGROUP
netbios name = FILE_SERVER
server string = Samba Server Version %v
interfaces = lo, eth0,
log file = /var/log/samba/log.%m
max log size = 50
unix extensions = No
load printers = No
idmap config * : backend = tdb
hosts allow = 192.168.123.
cups options = raw
wide links = Yes

comment = Home Directories
path = /home/share/
write list = superman, @users
force user = superman
read only = No
create mask = 0777
directory mask = 0777
inherit permissions = Yes
guest ok = Yes

I've tried a lot to get this to work: the disk are chmodded to 777, I've tried turning off selinux, I've added the samba_share_t label to the disks and as can be seen in the above output I tried to make the smb config as permissive as I could, but still I cannot write to the share (tried from Windows 7 and another Fedora installation).

What can I try to be able to write to the shares?

EDIT: The replies I got so far are mostly concerned with the smb.conf. I have however tried a lot of different setup, ready made configs, and solutions to similar problems for the smb.conf file, so I suspect that the real problem is somewhere else.

share|improve this question
What are the parameters for: security, map to guest, guest account, browseable. – harrymc Sep 25 '13 at 13:25
Defaults. So security = user, map to guest = never, guest account = nobody, browseable = true. – Tiddo Sep 27 '13 at 10:44
"security = user" requires correct username/password. Have you used smbpasswd? Better info in Chapter 9. Users and Security. – harrymc Sep 27 '13 at 11:41
what happens if you remove the inherit permissions setting? it and the mask settings conflict. aslo could you please confirm that /home/share is 777, not just its contents? – Frank Thomas Sep 27 '13 at 11:44

You say the root directory is owned by user superman but also group superman. Is that not a problem? If superman is member of the group users you should make the group of the root directory users (and force this for all other users) or else all other users will not have access.

So force the shared directories to superman:users.

After that you could also try changing/adding the following:

valid users = @users
create mode = 0660
directory mode = 0770
force create mode = 0660
force directory mode = 0770
force user = superman
force group = users

This is, if superman is a member of group users. If not then add superman to valid users.

share|improve this answer
Groups are not the problem, currently only the superman user should have access to the share. However, I tried you solution, but it didn't work unfortunately. – Tiddo Sep 27 '13 at 10:37

You might want to take a look at how you have /mnt/share/disk linked to /home/share.

The path that you have in SMB.conf doesn't match what your mount points are for the drives.

If you are using a symbolic link you might want to check the permissions there.

share|improve this answer
That's a good catch! I'm currently not at home, but I'll look into it when I'm there. – Tiddo Sep 30 '13 at 19:49

for what it is worth, I couldn't access my samba share, maybe you have forgotten to add you username to the samba password group (for lack of beter description phrase)

this is what I did to get mine to work

smbpasswd -a username

after by using nautilus, shared my drive/folder with right-click, sharing, etc.

create your password, and use your username and passsword (which you just entered) to access your samba drive, you can also map this drive in Windows

hope this could help

share|improve this answer

Here is an example of one of my shares. Take note of the writable option.

create mask = 0777
directory mask = 0777
browseable = yes
writeable = yes
path = /var/rails
share|improve this answer
I have writable=yes in my config, as well as read only = no. These 2 are synonymous to each other and hence only one is shown in the output. I suspect the problem isn't in my config file but somewhere else. However I have no idea where. – Tiddo Sep 21 '13 at 10:58
I had the same problem and I fixed it by changing writable to writeable... – Grzegorz Gierlik Feb 14 '14 at 23:51

Had same problem, actually very frustrating, could browse with all users but remained read only until ..... changed the creat & directory mask to 0777, and did the chmod 777 /{path} and it worked.

share|improve this answer
The question indicates that create mask and directory mask are already 0777, and that the OP has done chmod 777, so this is a non-answer. – Scott Nov 17 '15 at 21:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .