Samba Files and Folders keep appearing and disappearing

Installing, Configuring, Troubleshooting server daemons such as Web and Mail
Post Reply
frperalta1
Posts: 9
Joined: 2008/05/18 20:29:01

Samba Files and Folders keep appearing and disappearing

Post by 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]
[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
[/code]
Any help will be greatly appreciated.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Samba Files and Folders keep appearing and disappearing

Post by 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]
local master = yes
os level = 222
preferred master = yes
[/code]

frperalta1
Posts: 9
Joined: 2008/05/18 20:29:01

Re: Samba Files and Folders keep appearing and disappearing

Post by 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.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Samba Files and Folders keep appearing and disappearing

Post by pschaff » 2009/12/15 18:55:15

If you run[code]smbclient -L servername[/code]does the Samba server "servername" (whatever the server hostname is) show up as the workgroup master?

frperalta1
Posts: 9
Joined: 2008/05/18 20:29:01

Re: Samba Files and Folders keep appearing and disappearing

Post by frperalta1 » 2009/12/15 19:16:48

I get the following:
[code]
# 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
[/code]
and my smb.conf looks like this:
[code]
# 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
[/code]

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Samba Files and Folders keep appearing and disappearing

Post by 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]
[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
[/code]
[share]
comment = Public Share
path = /share
public = yes
writable = yes

frperalta1
Posts: 9
Joined: 2008/05/18 20:29:01

Re: Samba Files and Folders keep appearing and disappearing

Post by 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.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Samba Files and Folders keep appearing and disappearing

Post by 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.

frperalta1
Posts: 9
Joined: 2008/05/18 20:29:01

Re: Samba Files and Folders keep appearing and disappearing

Post by 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.

Post Reply