Have only read access to Samba

Posted by Tahir Malik on Super User See other posts from Super User or by Tahir Malik
Published on 2012-09-29T12:04:22Z Indexed on 2012/10/01 9:40 UTC
Read the original article Hit count: 342

Filed under:
|
|
|

Hi I've been struggling a lot with Samba on Centos 5.5 lately.

I develop in Windows 7 and send files through scp (ant task), but it's to slow and wanted to setup thoroughly samba.

After installing and following some guides I've done the following:

  1. Disable firewall (iptables)
  2. Disable SelLinux (didn't do that at the start, but didn't help either)
  3. setup my smbusers file to map my windows user to root (root = "Tahir Malik" --> works)
  4. added a current user mitco to the sambapassdb with the command smbpasswd -a mitco , because the windows user had only read access

So both the users have read access to my share. Here is my smb.conf snippit:

[global]
        workgroup = MITCO
        server string = Samba Server Version %v
        netbios name = centos
    ;   interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
    ;   hosts allow = 127. 192.168.12. 192.168.13.

 [alf4]
    comment = Alfresco 4
    path = /opt
    read only = no
    valid users = mitco, mitco
    force user = root
    force group = root
    admin users = mitco , mitco
    writeable = yes
;   browseable = yes

What also maybe important is that the /opt is only writable by root, but that shouldn't matter because I use the force user and group or admin users.

The log file :

[2012/09/29 07:43:44, 0] smbd/server.c:main(958) smbd version 3.0.33-3.39.el5_8 started. Copyright Andrew Tridgell and the Samba Team 1992-2008 [2012/09/29 07:43:59, 1] smbd/service.c:make_connection_snum(1085) mitco-tahir (192.168.13.1) connect to service alf4 initially as user root (uid=0, gid=0) (pid 5228)

© Super User or respective owner

Related posts about linux

Related posts about permissions