Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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:

[global]
workgroup = WORKGROUP
netbios name = FILE_SERVER
server string = Samba Server Version %v
interfaces = lo, eth0, 192.168.123.191/8
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

[share]
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? samba.org/samba/docs/using_samba/ch08.html –  Frank Thomas Sep 27 '13 at 11:44
add comment

3 Answers 3

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

[rails]
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 at 23:51
add comment

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
add comment

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
add comment

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.