You are not logged in.

#1 2009-09-20 10:09:24

stefek
Member
Registered: 2009-04-14
Posts: 33

[SOLVED]Problems with Samba configuration

Hi!!
I'm trying to get my Samba server working properly. It should work, but it doesn't. Here is my smb.conf:

[global]              
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
    workgroup = XXX                                                                       
    server string = serwer
    netbios name = serwer
    guest account = nobody
    security = share
 hosts allow = ALL
interfaces = lo eth0 eth1
bind interfaces only = true
read raw = yes
write raw = yes
getwd cache = yes
write cache size = 65536
domain logons = yes
domain master = yes
preferred master = yes
local master = yes
usershare allow guests = yes
wins support = yes

[CD]
guest ok = yes
path = /home/stefek/cd
available = yes
browsable = yes
;public = yes
;writable = no

When I'm trying to access to CD from my computer via dolphin it opens, but there are no files, although in /home/stefek/cd there are plenty of files.
When I uncomment public and writable, there is error in dolphin that this folder didn't exist. I think it should work.
I really appreciate any help
stefek

Last edited by stefek (2009-09-20 11:48:21)

Offline

#2 2009-09-20 10:37:11

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: [SOLVED]Problems with Samba configuration

Maybe you have a problem with the linux permissions on you home folder (on the server).
When you connect to the share, do you use your username and password? Or do you connect as "guest". If you connect as guest, then Samba tries to enter you homedirectory as user nobody, and this user normally has no access to that folder.
If this is the case you will need to set the execute bit on the folder to either your group or everybody. This allows for other users to enter your homedir.

EDIT: You can also make a folder like /home/share and make it world read/writeable. Then make it available via samba and see if everything works like you expect. This way you can make sure your samba server is working correctly.

Last edited by madeye (2009-09-20 11:14:32)


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#3 2009-09-20 11:13:11

stefek
Member
Registered: 2009-04-14
Posts: 33

Re: [SOLVED]Problems with Samba configuration

I want it to work as in window$: when somebody would like to see my shared folders there is no needed any username and password, just click and see. Here is output of ls with this shared folder:

drwxrwxrwx  2 stefek stefek   12288 2009-09-11 20:20 cd

Offline

#4 2009-09-20 11:18:30

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: [SOLVED]Problems with Samba configuration

The permissions are set on your share folder to give access to everyone, but what about your /home/stefek folder? If the executive bit isn't set there, the guest user will not be able to go through it into your share directory.


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#5 2009-09-20 11:28:10

stefek
Member
Registered: 2009-04-14
Posts: 33

Re: [SOLVED]Problems with Samba configuration

I've changed

guest account = nobody

to

guest account = stefek

and now i can access my shares from local computer and from other computers in my network.

I've also tried to change permissions of /home/stefek folder and ls -l returns

drwxr-xr-x 40 stefek stefek  4096 2009-09-20 13:23 stefek

with guest account=nobody it also works.
Which solution is better/safer?

Offline

#6 2009-09-20 11:39:29

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: [SOLVED]Problems with Samba configuration

I would say it doesn't matter which solution you use. They both give access to the shared folder. But if you use stefek as your guest account, then there is no need to have world executive bit set. So you could change the permissions to

drwxr-x--- 40 stefek stefek  4096 2009-09-20 13:23 stefek

MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#7 2009-09-20 11:47:57

stefek
Member
Registered: 2009-04-14
Posts: 33

Re: [SOLVED]Problems with Samba configuration

Ok. Thank for help. I think this problem is solved ;-)

Offline

Board footer

Powered by FluxBB