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