You are not logged in.

#1 2007-12-15 20:37:50

slemKaffe
Member
Registered: 2007-11-20
Posts: 23

Cannot access folder shared with samba

Hi, I have some problems sharing files using samba. I have been browsing around the fourm, and it looks like I'm not  the only one with this issue. However, I have not been able to find any solution so far.

What I want do to is simply to share a folder (/home/username/downloads) through samba using "share" as security level.

Here is my current smb.conf file:

[global]
workgroup = WORKGROUP
server string = Archserver
security = share

[downloads]
path = /home/username/downloads/
guest ok = yes

The file is pretty much a duplicate of a file I'm using (without any issues) on another comupter also running arch. On this computer however, it doesn't work. I can locate the computer on the network in smb://workgroup and even see the folder that I'm trying to share, but once I try to access the shared folder I get the following error:
"The file or folder smb://kaffekopp/downloads does not exist."

Can you guys give me any pointers on how to get this to work?

Offline

#2 2007-12-16 08:05:57

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Cannot access folder shared with samba

Hi slemKaffe,
check the permissions of the shared folder (both read (r) and access (x) should be possible).
Also, add these lines to smb.conf file (in global section) in order to produce a log file:

 
log level = 2
log file = /var/log/samba.log.%m

you can change the log level (from 1 to 10)

Offline

#3 2007-12-16 19:55:49

slemKaffe
Member
Registered: 2007-11-20
Posts: 23

Re: Cannot access folder shared with samba

luca wrote:

Hi slemKaffe,
check the permissions of the shared folder (both read (r) and access (x) should be possible).

These are the folder permissions:

[sven@kaffekopp ~]$ ls -la|grep downloads
drwxr-xr-x   6 sven users   4096 2007-12-15 18:53 downloads
luca wrote:

Also, add these lines to smb.conf file (in global section) in order to produce a log file:

 
log level = 2
log file = /var/log/samba.log.%m

you can change the log level (from 1 to 10)

Added suggested lines, restarted samba, then I tried to access the folder from another computer:

[sven@kaffekopp ~]$ cat /var/log/samba.log.192.168.2.101
[2007/12/16 20:38:32, 2] smbd/reply.c:reply_special(324)
  netbios connect: name1=KAFFEKOPP       name2=TEKOPP
[2007/12/16 20:38:32, 2] smbd/reply.c:reply_special(331)
  netbios connect: local=kaffekopp remote=tekopp, name type = 0
[2007/12/16 20:38:34, 0] smbd/service.c:make_connection_snum(1003)
  '/home/sven/downloads' does not exist or permission denied when connecting to [downloads] Error was Permission denied

I have no idea why I get this error.

Edit:
Do I have to add anything to my /etc/hosts.allow file in order to use samba properly?

Last edited by slemKaffe (2007-12-16 21:00:37)

Offline

#4 2007-12-17 07:03:45

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Cannot access folder shared with samba

Hi slemKaffe,
add this directive to downloads section:

read only = no

Restart samba

Offline

#5 2007-12-17 16:58:56

slemKaffe
Member
Registered: 2007-11-20
Posts: 23

Re: Cannot access folder shared with samba

luca wrote:

Hi slemKaffe,
add this directive to downloads section:

read only = no

Restart samba

Tried this, but I still get the same error message as before. No change in the log either.

Does samba require any other daemons to work properly?
What settings do I need to have in my /etc/hosts.allow file to use samba?
Do I have to add anything to my /etc/fstab file to be able to use samba?
Do I have to add some sort of guest user with smbpasswd?

Last edited by slemKaffe (2007-12-17 17:00:27)

Offline

#6 2007-12-17 18:58:33

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Cannot access folder shared with samba

Can you post the complete smb.conf file?

Offline

#7 2007-12-17 19:48:27

slemKaffe
Member
Registered: 2007-11-20
Posts: 23

Re: Cannot access folder shared with samba

[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: MIDEARTH
workgroup = WORKGROUP
# server string is the equivalent of the NT Description field
server string = Archserver

# Security mode. Defines in which mode Samba will operate. Possible
# values are share, user, server, domain and ads. Most people will want
# user level security. See the Samba-HOWTO-Collection for details.
security = share

log level = 2
log file = /var/log/samba.log.%m


[downloads]
path = /home/sven/downloads/
guest ok = yes
read only = no

Last edited by slemKaffe (2007-12-17 19:48:48)

Offline

#8 2007-12-18 06:46:32

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Cannot access folder shared with samba

Put

guest only = yes

in downloads section and restart samba

Offline

#9 2007-12-18 13:58:05

slemKaffe
Member
Registered: 2007-11-20
Posts: 23

Re: Cannot access folder shared with samba

Did as you said, but I still get the same error as before. Nothing new in the log file either.

Offline

#10 2007-12-18 15:05:30

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Cannot access folder shared with samba

The log file says "Permission denied" so you could try to move the downloads directory up to one level (/home/downloads instead of /home/sven/downloads).
Just another try before this move: set the permission of the folder to 777:

chmod 777 downloads

As soon as possible I try to replicate your configuration on my machine.

Last edited by luca (2007-12-18 15:06:45)

Offline

#11 2007-12-18 15:41:31

slemKaffe
Member
Registered: 2007-11-20
Posts: 23

Re: Cannot access folder shared with samba

First of all, I just want to thank you for helping me out here luca. I really apreciate your efforts.

I finaly managed to sort this out. All I had to do was to add access(x) permissons for my /home/sven folder.

Last edited by slemKaffe (2007-12-19 02:16:31)

Offline

#12 2007-12-18 16:00:42

luca
Member
From: Rome
Registered: 2005-10-30
Posts: 280

Re: Cannot access folder shared with samba

Good!!!

Offline

Board footer

Powered by FluxBB