LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SAMBA: cannot share directory when it's not under "/" dir (https://www.linuxquestions.org/questions/linux-networking-3/samba-cannot-share-directory-when-its-not-under-dir-800268/)

ethereal1m 04-06-2010 01:12 AM

SAMBA: cannot share directory when it's not under "/" dir
 
Dear all,
I was able to share a directory when it's under "/" (root) directory between the server and an XP client, but when I want to share a directory that located in different partition, I got an error.

Suppose I have a partion /usr/local that is separated from / and I want to use /usr/local/share as a Samba share directory.

Therefore in smb.conf:
Code:

[share]
  comment = Temporary file space
  path = /usr/local/share
  writable = yes
  public = yes

log.smbd says:
Code:

smbd/service.c:make_connection(1366)
serenity (::ffff:192.168.1.2) couldn't find service usr

And the XP client failed to connect.
What does this mean?

regards,
ethereal1m

sadiqdm 04-06-2010 04:13 AM

Samba shares
 
I tried what you did and found my smb.conf file looked like this:
Code:

[global]
        workgroup = headley
        netbios name = dylan
        name resolve order = bcast host lmhosts wins
        map to guest = Bad User
        local master = yes
        preferred master = yes
        os level = 65
        usershare allow guests = Yes
        usershare max shares = 100
        usershare owner only = False
        passdb backend = smbpasswd
        wins support = No
        wins server =
[home]
        path = /home/sadiq
        read only = yes
        guest ok = yes
        force user = sadiq
[share]
        comment = Temporary file space
        guest ok = Yes
        inherit acls = Yes
        path = /usr/local/share/
        read only = No

I am running openSuse 11.1, kernel 2.6.27.45-0.1-default x86_64, KDE 3.5.10 "release 71, Samba 3.2.17-11.5.1-x86_64. The shares are both visible from my Acer netbook running Ubuntu 9.10 & a Windows desktop running XP Pro.

It's possible you are using "old" terminology. Try changing the "writeable" & "public" lines.

Did you edit the smb.conf by hand or use a GUI tool? I used to do it all by hand, but since I started using openSuse 11.1, I found the YaST tool worked OK. The GUI tool is not as easy to use, but seems to work just as well once I got the hang of the differences.

ethereal1m 04-06-2010 05:36 AM

I changed the "writable" and "public" line, but still get the same error. The main question is:
Code:

smbd/service.c:make_connection  couldn't find service usr
Why does the daemon think usr is a service, where it's actually a directory that is specified in smb.conf?
The message comes out as soon as I execute:
Code:

net use * \\firefly\usr\local\share /user:ethereal1m
from XP client, where firefly is the name of the server. Seems that SAMBA cannot find /usr/local thinking /usr as a service.

When I do this (where /share worked):
Code:

path = /share/temp
the log spit out
Code:

smbd/service.c:make_connection_snum(1194)
  serenity (::ffff:192.168.1.2) connect to service share initially as user ethereal1m (uid=1000, gid=100) (pid 4564)

but actually the XP client got connection denied notice that "service share" in this case is the /share directory.

What's going on here? any ideas? thanks

djsmiley2k 04-06-2010 05:46 AM

What are the permissions on /usr/local/share/ ?

I was getting the same error in my smbd log when my permissions wern't correct for the dir being accessed (I just had a simple everyone browsing as guest; and guest didn't have any permissions);

michaelk 04-06-2010 07:28 AM

Can not tell if what you posted was a typo but when trying to connect via the command line you need to use the samba share name and not the path. i.e.
net use * \\firefly\share

As already suggested make sure the permissions are set correctly for shared directory.

ethereal1m 04-26-2010 04:27 AM

I just realized that when I execute:
Code:

net use * \\server\share /user:ethereal1m
in XP client, "share" in this context is the name of the service, I misunderstood it as the name of the folder.....

thanks guys


All times are GMT -5. The time now is 04:33 AM.