Samba share failed after rsync

I have a SUSE machine I am using as a file server with samba shares on it. One is a current share where users can read/write to the folders. Another is an archive share where samba connected users can only read since the files don’t need to be changed. Last week I used rsync to move folders and files from the current share to the archive share. For some reason this caused the archive share to fail. All other samba shares continued to work. The archive share was there in samba but folders that had been created or updated with rsync were unavailable. All other folders were there and accessible. From a mac, attempting to open one of the folders would just result in wait icon with nothing happening. From Ubuntu and windows I would get “cannot access, may have been deleted” error messages. It didn’t appear to be an issue with permissions. (All permissions were preserved during rsync.) I created a share to one of the folders that I couldn’t access and was able to make that share work but still couldn’t access through the folder on the larger share. I deleted the archive share using folder properties/share and then recreated it that way. The problem persisted. I restarted the Suse machine which then caused the complete archive share to be inaccessible from samba. I then used YAST to delete the share and recreate it. This appears to have fixed it for now. The mac needed to be rebooted to connect, the windows machine just needed a refresh. Ubuntu, I can now connect through the terminal, but nautilus is still not connecting. I haven’t rebooted, to see if that will clear nautilus to make it work.

Since I will be repeating this process of moving files from one share to the other, I am wondering what I did wrong. I couldn’t find anything in the smdb or nmdb logs that would help me. Does anyone have any suggestions as to why rsync caused samba to fail? Or where I can look to find any error messages?

This is really difficult to visualise so I ask a few questions then a few more after I see your answers.

Can you please post the smb.conf from the openSUSE server.

Also, on the server, the return from “ls -l” pointing at the archive share and at the current share.
Also, on the server, the return from “ls -l” pointing one level deeper than the archive share and at the current share.

Afterthought: what is the version of openSUSE on the server?

Currently Using Suse 10.3
Smb.conf is as follows:



	workgroup = WORKGROUP
# timeserver added 2/1/05

	timeserver = yes

	interfaces = 127.0.0.1 eth0

	bind interfaces only = true

#	printing = cups

#	printcap name = cups

#	printer admin = @ntadmin, root, administrator

	map to guest = Bad User

	server string = Graphic Server

	add machine script = /usr/sbin/useradd  -c Machine -d /var/lib/nobody -s /bin/false %m$

	domain master = No



	unix extensions = no



	name resolve order = lmhosts wins bcast host

	usershare allow guests = No



[groups]

	comment = All groups

	path = /data1/home/groups

	read only = no

	inherit permissions = Yes

	browseable = no



;; [pdf]

;;   comment = PDF creator

;;   path = /var/tmp

;;   printable = yes

;;   print command = /usr/bin/smbprngenpdf -J '%J' -c %c -s %s -u '%u' -z %z

;;   create mask = 0600

;;   browseable = yes

;;   guest ok = no

;; [printers]

;;   comment = All Printers

;;   path = /var/tmp

;;   printable = yes

;;   create mask = 0600

;;   browseable = no

;;   guest ok = no

;; [print$]

;;   comment = Printer Drivers

;;   path = /var/lib/samba/drivers

	write list = @ntadmin root



#	force group = ntadmin

#	create mask = 0664

#	directory mask = 0775

#	browseable = yes

#	guest ok = no

#	printable = no



[public]

	comment = public share

	path = /data2/DB/

	create mask = 775

	directory mask = 775

	force create mode = 775

	force directory mode = 775

	guest ok = yes

	case sensitive = no

	strict locking = no

	read only = no

	force group = Graphics

	inherit permissions = yes



[graphics]

	comment = Graphics files

	path = /data1/Graphics/

	guest ok = yes

	read only = no

	create mask = 775

	directory mask = 775

	force create mode = 775

	force directory mode = 775

	force group = Graphics

	inherit permissions = yes





[john]

	path = /data1/home/john/

	read only = no





[backup]

	comment = public share

	path = /data2/Backup_Drive/

	read only = no



[ftp]

	path = /home/ftp/

	guest ok = yes

	read only = no

	case sensitive = no

	strict locking = no

	create mask = 0775

	directory mask = 0775




[archive]

	comment = archive

	inherit acls = Yes

	path = /mnt/Archive

	read only = Yes

	guest ok = Yes

	strict locking = No

/data1 ls -l

drwxrwxr-x 9 neil users 20480 2012-02-28 15:31 Graphics

/data1/Graphics ls -l

total 16
drwxrwxrwx 22 771 Graphics 4096 2010-08-12 15:15 Office_Files
drwxrwxr-- 27 neil Graphics 4096 2012-02-23 13:50 Main_Files_Inc
drwxrwx–x 5 neil Graphics 4096 2005-09-22 15:09 Temporary Items
drwxrwx–x 6 brandon Graphics 4096 2012-03-12 08:42 Transfer

/mnt ls -l

total 12
drwxrwxr-x 65 root users 4096 2012-02-27 09:56 Archive
drwxr-xr-x 2 root root 4096 2010-08-23 15:08 Archive2
drwxr-xr-x 2 root root 4096 2008-03-16 17:20 Backup

/mnt/Archive


drwxr-xr-x  3 john    users     4096 2006-09-29 09:06 3M
drwxr-xr-x  4 neil    users     4096 2004-12-17 09:34 Acxiom
drwxrwxr-x  2 neil    Graphics  4096 2004-07-26 09:37 AJ_Schaake_Plaques
drwxr-xr-x  3 john    users     4096 2007-06-06 11:57 Allianz
drwxrwxr--  8 brandon Graphics  4096 2011-04-04 10:33 Allina
drwxrwxr--  2 peter   Graphics  4096 2007-09-20 10:16 Art_Holdings
drwxrwxr--  5 peter   Graphics  4096 2008-11-17 15:33 Beacon_Bank
drwxrwxr--  3 brandon Graphics  4096 2009-01-29 18:57 Blue_Cross_Blue_Shield
drwxr-xr-x  6 john    users     4096 2007-09-25 17:12 Boston_Scientific
drwxrwxr-x  2 neil    Graphics  4096 2010-05-11 10:28 Budget 9_24_04
drwxr-xr-x  2 neil    users     4096 2005-02-24 12:56 Cabelas
drwxrwxr-x  2 neil    Graphics  4096 2004-11-11 18:24 cambria
drwxr-xr-x  7 root    root      4096 2012-02-24 11:33 Cargill
drwxrwxr--  3 brandon Graphics  4096 2009-01-29 19:01 Central_Bank
drwxrwxr-x  2 neil    Graphics  4096 2004-11-30 09:45 Chaska
drwxr-xr-x 13 root    root      4096 2012-02-25 09:02 Coloplast
drwxr-xr-x  5 root    root      4096 2012-02-25 13:16 Deluxe
drwxrwxrwx  8 neil    Graphics  4096 2010-05-11 10:29 GE_Interlogix
drwxr-xr-x  3 root    root      4096 2007-09-25 17:08 General_Mills
drwxrwxr-- 11 brandon Graphics  4096 2009-01-29 19:18 Helms_Briscoe
drwxr-xr-x  3 neil    users     4096 2005-04-18 15:01 hobie
drwx------  2 root    root     16384 2010-08-23 15:07 lost+found
drwxrwxrwx  8 neil    Graphics  4096 2005-06-28 17:39 Luther
drwxrwxr--  4 peter   Graphics  4096 2007-09-19 10:26 Luther_Updates
drwxrwxr-x  6 neil    Graphics  4096 2004-07-30 17:32 Mackay
drwxrwxr-x  3 neil    Graphics  4096 2004-07-28 14:38 Mayo Clinic
drwxrwxr--  9 peter   Graphics  4096 2011-10-03 13:30 MDA
drwxr-xr-x  5 brandon users     4096 2006-09-20 14:24 MOA_Wild
drwxr-xr-x  3 root    root      4096 2007-02-06 11:51 MPR
drwxrwxr-- 14 brandon Graphics  4096 2010-07-13 11:30 NAS_Bank
drwxr-xr-x  9 brandon users     4096 2005-12-09 09:12 NOW (Screen saver)
drwxrwxr-x  2 neil    Graphics  4096 2003-02-28 15:11 NY job
drwxrwxr--  4 peter   Graphics  4096 2008-02-22 16:06 Pillsbury
drwxrwxr-x  2 neil    Graphics  4096 2002-04-25 16:22 R2
drwxrwxr-x  6 neil    Graphics  4096 2004-10-26 15:25 Rice Hospital
drwxrwxr-x  2 neil    Graphics  4096 2003-07-18 13:33 RMS
drwxrwxr-- 13 peter   Graphics  4096 2010-08-17 14:10 Sight_Creative
drwxr-xr-x  7 brandon users     4096 2006-09-28 16:51 Simonson
drwxrwxr-x  2 neil    Graphics  4096 2001-12-06 15:33 Stylmark
drwxrwxrwx  5 neil    Graphics  4096 2007-09-25 17:05 Tekserve
-rwxr-xr-x  1 root    root      1355 2004-11-04 11:43 usb-storage
drwxrwxr--  3 peter   Graphics  4096 2011-01-11 14:41 US_Water_Services
drwxr-xr-x  2 neil    users     4096 2004-09-15 07:51 water_drops
drwxr-xr-x  3 john    users     4096 2008-03-05 16:34 Wells_Fargo
drwxrwxr--  3 brandon Graphics  4096 2010-04-06 14:16 Xcel_Energy

This is rich with possibilities. It’s triggered by rsync, so rsync changes something on or in the folders that are updated or added, something that makes the folders inaccessible via Samba. If rsync does not change the folders (as you said), does not change their permissions or ownership, then the suspect would be the contents of the folders. The suspicion is that the contents become inimical to Samba.

This is one set of conditions that controls the archive share:

[archive]
comment = archive
path = /mnt/Archive
inherit acls = Yes
guest ok = Yes
strict locking = No

and this too:

map to guest = Bad User
which means that remote viewers are trying to access as the user “nobody”.
If, after the rsync, the blocked folders cannot be accessed by “nobody” (which is unlikely), or the files within cannot be viewed by “nobody”, then access would be blocked.

You have to examine the user & group and the permissions of the blocked folders and their contents in the context of the question “can user nobody access and view the files”?
This question is for Samba permissions and for Linux permissions, two sets of permissions.

I would closely examine those things for contents before and after rsync.

On 2012-03-14 02:46, swerdna wrote:
> You have to examine the user & group and the permissions of the blocked
> folders and their contents in the context of the question “can user
> nobody access and view the files”?

Some of the folders are not readable (not browsable, “x”), by “others” in
the listing. The user “nobody” is “other”.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)

“nobody” seems to be part of the issue. Or at least it duplicates the problem.

Checking logs, the initial problem may have occurred when someone didn’t log in to access the server from their Mac. Log in should have been automatic but for some reason they were using a guest account so accessed as “nobody”.
There is no reason for anyone to access the server that isn’t logged in since they can’t write to the other shares without being logged in.

Nautilus in Ubuntu seems to access as “nobody” by default. I never noticed before because I have no need to access that share. Still not sure why the Windows machine wouldn’t access it. That only ever attempted using a proper user according to logs. Could be error on my part in trying to fix the issue.

So, in future:
Check samba log to see how access was attempted.
Then compare access to permissions on folders/files

Rsync probably had nothing to do with it.
Thanks for the help guys.

I never realized “x” was required to browse folder. Thanks.

On 2012-03-14 18:06, joadl wrote:
>
> I never realized “x” was required to browse folder. Thanks.

Yes, the x changes meaning in folders compared to in files.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” at Telcontar)