Samba guest share and writeable

Latest response

Hello everybody

 

i have a problem with my redhat entreprise 6 and samba

 

i would like create a share directory with samba but without auth and writeable,
i have a same configuration on my redhat entreprise 5 and work fine

 

but i reproduce my config on my redhat 6 but is doesn't work,

for guest is ok but can't create a new file or directory

 

this is my config

# Global parameters
[global]
        log file = /var/log/samba/log.%m
        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
#        force directory mode = 777
        force group = apache
        map to guest = Bad User
        encrypt passwords = yes
#        public = yes
        dns proxy = No
        netbios name = Dev Server
        writeable = yes
        delete readonly = yes
        printing = cups
        server string = SMB Dev Server
        workgroup = WORKGROUP
#        force create mode = 777
        os level = 20
        force user = apache
        printcap name = cups
        create mode = 644
        max log size = 50
        directory mode = 644

[homes]
        comment = Home Directories
        read only = No
        browseable = No

[WWW]
        path = /data
        force user = apache
        force group = apache
        read only = No
#        create mask = 0777
        force create mode = 0644
        directory mask = 0744
        guest ok = Yes

 

And my share directory
drwxr-xr-x.   5 apache apache  4096 Apr 22 17:30 data

 

 

Smbstatus on RH5

Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
29740        48         DENY_NONE  0x100001    RDONLY     NONE             /data   .   Sun May  1 13:16:24 2011

Smbstatus on RH6

Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
9857         48         DENY_NONE  0x100081    RDONLY     NONE             /data   .   Sun May  1 15:24:57 2011

Best regards
 

Responses

Your problem description is very "lacking." Telling us just that it "doesn't work" tells us next to nothing. We'd want to see the error messages you're getting - both from the client (CLI or GUI, etc.) and from the general system logs and the application logs (Samba being your application). Many times, the answer to a problem is simple if you look through the logs.

 

As an aside: do you possibly have SELinux enabled on the RHEL 6 box but not the RHEL 5 box?

 

Hi Julien, did you find a solution to your problem? We'd be happy to help if you could provide some additional information.

 

Thanks,

 

Henry Hutton

Online User Groups Community Manager

If you are using the same configuration with Samba on RHEL6, and it is not working, you might want to consider looking at SELinux per Thomas' comment.

 

Take a look at the following man page:

samba_selinux(8)

 

 

which describes the following to permit anonymous writes:

setsebool -P allow_smbd_anon_write 1

 

You can enable sharing of home directories with:

setsebool -P samba_enable_home_dirs 1

 

If you do not want to enable anonymous writes, and are only sharing content with Samba, make sure to set the SElinux context for your directories appropriately.