Samba Files and Folders keep appearing and disappearing

Installing, Configuring, Troubleshooting server daemons such as Web and Mail

Samba Files and Folders keep appearing and disappearing

Postby frperalta1 » 2009/12/15 00:40:54

I have an intermittent issue with with Samba. I can access my samba share with windows xp and vista using windows networking and even by mapping the share to a drive. The problem is that the files and folders disappear inadvertently and I can only access them again if I open the share again from the start with windows explorer.

Selinux is disabled and the firewall ports for samba are open.

The following software is installed:

samba 3.0.33-3.15.el5_4
samba-client 3.0.33-3.15.el5_4
samba-common 3.0.33-3.15.el5_4

The following is my smb.conf file which worked fine with my Fedora 7 server but I haven't been so lucky with my CentOS 5.4:
Code: Select all
[global]
   log file = /var/log/samba/%m.log
   dns proxy = No
   cups options = raw
   browseable = Yes
   server string = vserver1
   socket options = TCP_NODELAY
   guest ok = Yes
   workgroup = workgroup
   os level = 20
   encrypt passwords = Yes
   security = share
   public = Yes
   keepalive = 1
   max log size = 50
#   wins support = Yes
#   local master = Yes
#   preferred master = Yes

[fileshare]
   path = /var/local/secure/fileshare
   writeable = Yes

Any help will be greatly appreciated.
frperalta1
 
Posts: 9
Joined: 2008/05/18 20:29:01

Samba Files and Folders keep appearing and disappearing

Postby pschaff » 2009/12/15 16:32:33

Seems likely to be a problem with the master browser for the workgroup. Have you tried making Samba the master?
Code: Select all
        local master = yes
        os level = 222
        preferred master = yes
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Samba Files and Folders keep appearing and disappearing

Postby frperalta1 » 2009/12/15 18:30:26

Phil,

Thanks so much for lending a hand.

I tried your suggestion but that did not seem to work...same results.

Before I tried your suggestion I had restarted my server (this AM) and Samba seemed to have been working for a while then the folders started disappearing again. This is the strangest issue because of it is so random. The folders and the files all have the same permission and owner/group structure. Folders are 755 and files are 744. And the owner/group on all of them is nobody/nobody. So I can't understand how some folders appear and some don't and then how they disappear and reappear.

Any suggestions greatly appreciated.
frperalta1
 
Posts: 9
Joined: 2008/05/18 20:29:01

Re: Samba Files and Folders keep appearing and disappearing

Postby pschaff » 2009/12/15 18:55:15

If you run
Code: Select all
smbclient -L servername
does the Samba server "servername" (whatever the server hostname is) show up as the workgroup master?
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Samba Files and Folders keep appearing and disappearing

Postby frperalta1 » 2009/12/15 19:16:48

I get the following:
Code: Select all
# smbclient -L vserver1
Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4]

        Sharename       Type      Comment
        ---------       ----      -------
        fileshare       Disk     
        IPC$            IPC       IPC Service (Samba Server Version 3.0.33-3.15.el5_4)
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.33-3.15.el5_4]

        Server               Comment
        ---------            -------
        BROTHERHL4070CD     
        FRANCISCO-PC         PacoLaptop
        MINDYLAPTOP          MindyLaptop
        VELOCITYSERVER1      VelocityServer1
        VSERVER1             Samba Server Version 3.0.33-3.15.el5_4

        Workgroup            Master
        ---------            -------
        WORKGROUP            VSERVER1

and my smb.conf looks like this:
Code: Select all
# Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2009/12/15 04:25:57

[global]
   server string = Samba Server Version %v
   security = SHARE
   username map = /etc/samba/smbusers
   guest ok = Yes
        local master = yes
        os level = 222
        preferred master = yes

[fileshare]
   path = /var/local/secure/fileshare
   read only = No
frperalta1
 
Posts: 9
Joined: 2008/05/18 20:29:01

Re: Samba Files and Folders keep appearing and disappearing

Postby pschaff » 2009/12/15 19:31:54

Added code tags to your post to preserve formatting. I'm stumped. Maybe somebody else will see something I'm missing.

Just for comparison, here's a config that works for me:
Code: Select all
[global]
        workgroup = TABB
        server string = Samba Server Version %v
        hosts allow = 127. 192.168.1.
        security = user
        passdb backend = tdbsam
        cups options = raw
        username map = /etc/samba/smbusers
        local master = yes
        os level = 222
        preferred master = yes

[homes]
        comment = Home Directories
        browseable = no
        writable = yes

[printers]
        comment = All Printers
        path = /var/spool/samba
        browseable = no
        printable = yes

[share]
comment = Public Share
path = /share
public = yes
writable = yes
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Samba Files and Folders keep appearing and disappearing

Postby frperalta1 » 2009/12/16 18:20:26

After much tinkering, I opened the file browser and noticed that there was a file named smb.conf~ and a smb.conf file in the directory. I deleted the smb.conf~ file and restarted samba....it now works fine.

Thank you for the help.
frperalta1
 
Posts: 9
Joined: 2008/05/18 20:29:01

Re: Samba Files and Folders keep appearing and disappearing

Postby pschaff » 2009/12/16 18:42:02

I doubt that had anything to do with the problem. The smb.conf~ is likely a backup created by an editor and Samba would not pay any attention to it. Perhaps just the restart was the key, or as it is an intermittent problem, perhaps it is still waiting to bite you again. Hope not, but I hate it when things fix themselves - never know when they're going to break themselves again.
pschaff
Retired Moderator
 
Posts: 18277
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America

Re: Samba Files and Folders keep appearing and disappearing

Postby frperalta1 » 2010/01/08 18:32:14

Well, pshaff was right. I still have the disappearing file problem. The files will reappear when I restart samba (service smb restart) but they eventually disappear from the windows webfolder view or the mapped network drive view. Any ideas are welcomed, I am stumped.
frperalta1
 
Posts: 9
Joined: 2008/05/18 20:29:01


Return to CentOS 5 - Server Support

Who is online

Users browsing this forum: No registered users and 0 guests