Help - Search - Members - Calendar
Full Version: Streamlining Samba
Linuxhelp > Support > Technical Support
Pizentios
Hey,

i just finished setting up samba 3 on a slackware 9.1 box, it works fine...most of the time. Sometimes when i am trying to copy a file over from a windows box, it gives me the error: "can not copy file. path is too deep." or atleast somthing to that effect. When it does work, it seems to almost hang the windows box, but then it pulls through. I have read all the docs on the samba website and can't find anything wrong with my smb.conf file. anyways, here's my conf file:

CODE
[global]

       workgroup = CANDO
       security = user
       log file = /var/log/samba.log
       log level = 1
       max log size = 1000
       wins support = yes
       read only = no

       #Reduce the amount of time that samba scans for timeouts.
       change notify timeout = 300

       #Open files with no conections get closed after 15 mins.
       deadtime = 15

       domain master = no

       hide unreadable = yes

       hosts allow = 192.168.0.0/255.255.255.0 127.0.0.1

       hosts deny = ALL

       invalid users = root @wheel

       logon drive = p:

[homes]
       browseable = yes
       read only = no
[cando]

       path = /cando
       comment = Cando File Server
       create mode = 0755
       directory mode = 0755

       read only = no



i have also looked around the net (the linux documentation project...etc.), and i havn't come up with any answers.

anyways, if anybody has any ideas...or better yet some links to sites explaining how to streamlining samba, it would be helpful...i thank anybody in advance for the help that i am about to get.



-Pizentios
hughesjr
I don't see anything wrong with your config file...

I use samba on a Windows 2000 domain, but not under any real load.

Robert83 might have some real good info sites about samba...
Pizentios
would it have any difference on preformance if the samba box was behind a switch or infront of it?? i am goind to PM Robert83 and get those links.
Robert83
Hi,

I've used this howto

http://www.faqs.org/docs/samba/toc.html

you can find more http://www.faqs.org/docs/

but I also have that problem when accessing samba drives (but only 1 computer, the other has no problems), I'm trying to contact one of the book authors via e-mail, and beg him for some help regarding this problem...


Sincerely
Robert B
Robert83
Oh, and

here is my smb conf from a file server (that runs 2 programs for 30 users, without any problems).

System spec is:
XP1800+
512MB DDR400
Gigabyte NForce2
80GB Maxtor DiamonMax

CODE
[global]
  workgroup = CAPRIOLO
  server string = WebServer
  log file = /var/log/samba/log.%m
  max log size = 50
  security = SHARE
  prefered master = Yes
  local master = Yes
  wins support = Yes
  os level = 255
 
[homes]
  comment = Home Directories
  writable = Yes
  valid users = %S
  create mode = 0777
  directory mode = 0777
  browseable = no
 
[Capriolo]
  comment = Capriolo
  path = /share/capriolo
  writable = Yes
  guest ok = Yes
  printable = no
  create mode = 0777
  directory mode = 0777
  browseable = Yes
 
[WinXP(C:)]
  comment = WinXP(C:)
  path = /share
  writable = Yes
  guest ok = Yes
  printable = no
  create mode = 0777
  directory mode = 0777
  browseable = Yes
 
[DATA(D:)]
  comment = DATA(D:)
  path = /share2
  writable = Yes
  guest ok = Yes
  printable = no
  create mode = 0777
  directory mode = 0777
  browseable = Yes


also I've heard something about using a command interface (or something), with the samba.conf file if you have multiple ethernet cards in that computer (like me), to make samba accept connections on the specified ip adress...this might help (but I haven't tried it yet...will gona try it latter today).

Sincerely
Robert B
Robert83
Hi,

I just checked my book, the command is

interfaces = 192.168.1.1/24 (for example)

Note : the bit after the / is a reference to the subnet mask. "24" is
the value to use for an unsegmented Class C network.For more
information on subnet calculations, you might want to see
http://www.ralphb.net/IPSubnet/

Sincerely
Robert B
Pizentios
hey,

i just found a good site, listing the common samba config options: Samba Options
Pizentios
Update on the error message:

"The specified network name is no longer available."

This makes me think that the problem isn't with samba, but with the network. I asked a question a few posts back:

QUOTE
would it have any difference on preformance if the samba box was behind a switch or infront of it?


i am begining to think that mabye that's the problem...however, i have been knowen to be wrong. The thing is, it works sometimes. I changed a few things in the conf file, but i don't think that my changes have made any difference. Here's the new conf file:

CODE
[global]

       workgroup = CANDO
       security = SHARE
       log file = /var/log/samba.log
       log level = 2
       max log size = 50
       prefered master = no
       os level = 255
       wins support = yes
       read only = no

       #Reduce the amount of time that samba scans for timeouts.
       change notify timeout = 300

       #Open files with no conections get closed after 15 mins.
       deadtime = 15

       domain master = no

       hide unreadable = yes

       hosts allow = 192.168.0.0/255.255.255.0 127.0.0.1

       hosts deny = ALL

       invalid users = root @wheel

       logon drive = p:

[homes]
       comment = Home Directories
       browseable = yes
       writable = yes
       valid users = %S
       read only = no
       create mode = 0755
       directory mode = 0755
[cando]

       path = /cando
       comment = Cando File Server
       create mode = 0755
       directory mode = 0755
       writable = yes
       guest ok = yes
       read only = no


It looks to me like it's droping the connection. Does anybody have any ideas what would cause this? i am going to change the amount of time that samba waits to time out and see if that has any effect. Thanks for all the help that i have been given so far and for the help that i hope to receive in the future.
Robert83
Hi,

QUOTE
would it have any difference on preformance if the samba box was behind a switch or infront of it?


I don't believe that there would be any mayor speed changes...


CODE
      change notify timeout = 300
      deadtime = 15


you could try removing these two lines, and let samba use it's default values...

Sincerely
Robert B
Pizentios
i'll try that. thanks for the quick reply.
Pizentios
that seemed to work...sort of wink.gif It works quick and fast with smaller to medium files, but since i am a bit of a nut for having things working just perfect, i tryed sending over a bigger file. The file was about 27.3MB. It lost it's conenction after about half way though. However, this is not a big deal since most files that we will be sending to the box are around the 10-15MB range or smaller. Anyways, it seems to be working just fine now, for those smaller files i was talking about. I am going to try and put a beefer ethernet card in and see if that helps because the one we have in there right now is on the cheaper side. Thanks for everyones help.
Pizentios
New update, it kinda worked for a few days, now nobody can browse the workgroup computers. I shut samba down and it fixed it right away, so i know that the problem is to do with the smb.conf file. Would i have to add anything to my domain server for samba to work right? The domain/workgroup that is in my smb.conf file is the correct one, so that's why i am wondering if the problem really isn't with samba, but witht the domain server. Here i'll post my smb.conf file again:

CODE
[global]

       workgroup = CANDO
       security = SHARE
       log file = /var/log/samba.log
       log level = 2
       max log size = 50
       prefered master = no
       os level = 255
       wins support = yes
       read only = no
       encrypt passwords = yes
       domain master = no

       hide unreadable = yes

       hosts allow = 192.168.0.0/255.255.255.0 127.0.0.1

       hosts deny = ALL

       invalid users = root @wheel @nobody


[homes]
       comment = Home Directories
       browseable = yes
       writable = yes
       valid users = %S
       read only = no
       create mode = 0755
       directory mode = 0755
[cando]

       path = /cando
       comment = Cando File Server
       create mode = 0755
       directory mode = 0755
       writable = yes
       guest ok = yes
       read only = no


Thanks for the help that you guys have givn to me so far.
Robert83
Hi,

that happened to me, but only 2 times, I simply did a /etc/init.d/smbd [or something like this] restart , and it was fixed...

by the way, why don't you allow samba to be the local master browser?

prefered master = Yes
local master = Yes

you have only one lan right? 192.168.x.x something ?

Sincerely
Robert B
Termina
It's not elegant, but for big files I'd suggest using WinSCP2 (you can find it at my site HERE in the downloads section, it's freeware)

I've never really had problems with it, except a few times when trying to copy several directories at one time, just using drag and drop. (Letting WinSCP to do the transfering for you seems to work much better)
Pizentios
Thanks for the link Robert83, i think that i might use this program.

The reason that i have

prefered master
local master

like the way that they are, is because we have a domain server that needs to be the master otherwise people can't login to the network.
chrisw
winscp2 has nothing to do with samba making it work better or worse
winscp2 is a windows based secure copy which is the same
as scp for linux with copies stuff over a secure connection over port
22, the same port you would use to ssh to.
Termina
I never said it had anything to do with Samba.

I just said that for bigger files, it seems to work better than Samba. Just my 2 cents.

I'm well aware what SCP is.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.