samba does not work with links

W

wg035164

Guest
Dear experts,

if I access "normal" directories via samba everything is fine, if I use links the client reports "access denied". The samba option "follow symlinks" and "wide links" are set, even though no luck. If I use instead "mount --bind..." everything works again. Can somebody explain why ???

BR
George
 


Dear experts,

if I access "normal" directories via samba everything is fine, if I use links the client reports "access denied". The samba option "follow symlinks" and "wide links" are set, even though no luck. If I use instead "mount --bind..." everything works again. Can somebody explain why ???

BR
George

1. Did you restart the samba server after changing the config file? Sorry if it sounds obvious but I have no way of knowing your level of Linux understanding.

2. Are the options:

Code:
  follow symlinks = yes
  wide links = yes

under the [global] section in /etc/samba/smb.conf

3. Have you checked the permissions of the files and directories that the symlinks point to? Are the files readable (r bit) and the directories searchable (x bit) by the samba user?

If you've done all that, please provide the OS Distro, version and samba version. The below commands will help if you don't know them...

Code:
# Get the OS type and version

cat /etc/issue

# Get kernel release version

uname -r

# Get Samba version and info

smbstatus

Hope that helped.
 
Dear Hackinjack,

many thanks for your answer and yes I set all the necessary options and restarted samba countless of times, the x-bit is also set.

I use openSuse 12.2 with the kernel 3.4.11-2.16-default and the samba V3.6.7-48.12.1-2831. I really hope you can help me because up to now nobody could.

BR
George
 
George, try adding:

Code:
[COLOR=#000000][FONT=Ubuntu]unix extensions = no

[/FONT][/COLOR]
in the [global] section in /etc/samba/smb.conf

Then restart the samba daemon.

If that doesn't work, please set the debug level in /etc/samba/smb.conf to 10, then restart the daemon (again, sorry) then reply with the file /var/log/samba/log.smbd attached. There should also be a specific logfile in /var/log/samba for each machine that connects to the samba server, assuming you didn't change the default option for that in /etc/samba/smb.conf, that would be useful also for the client machine you are getting the errors from.

Good luck!
 
Dear hackinjack,

thank you so much, in the end it was unbelievably easy, the "unix extensions" did the trick. I do not know how many googling I did and how many posts I wrote but you must find the right person as always.

Over the weekend I will check if this "trick" will solve indirectly another problem: instead of symbolic links I used "mount --bind" to overcome the original problem with the links. Since I use "suspend to RAM (for ecological and quick boot reasons)" these mounts for the USB-drives only are somehow forgotten by Suse and are onyl restored if I do a real reboot. I will let you know how I fare...

Many, many thanks again
George
 
Dear hackinjack,

thank you so much, in the end it was unbelievably easy, the "unix extensions" did the trick. I do not know how many googling I did and how many posts I wrote but you must find the right person as always.

Over the weekend I will check if this "trick" will solve indirectly another problem: instead of symbolic links I used "mount --bind" to overcome the original problem with the links. Since I use "suspend to RAM (for ecological and quick boot reasons)" these mounts for the USB-drives only are somehow forgotten by Suse and are onyl restored if I do a real reboot. I will let you know how I fare...

Many, many thanks again
George

Glad that worked for you. Not sure about USB mounts after suspend to ram, that's a whole other world with udev etc.
 
Dear hackinjack,

funny things happen if I try a symbolic link pointing to a USB drive and wake up the machine from Suspend to RAM. First I thought "got it"meaning the link still worked but then it turned out that some of the subdirectories on the USB drive the link pointed to (one directory level up) could be reached while others could not. First I could not believe it but I tried it 3 times, when I reboot all the subdirectories can be accessed via the link pointing to a directory one level above those subs. How come ???

What I also noticed are many messages (a full page or so) while suspending to RAM and waking from it but it is so quick (something with "...soft reset failed...") you cannot read it. Do you know where I find a log about that ?

BTW: drives connected via Sata do not show this strange behaviour.

BR
George
 
Dear hackinjack,

funny things happen if I try a symbolic link pointing to a USB drive and wake up the machine from Suspend to RAM. First I thought "got it"meaning the link still worked but then it turned out that some of the subdirectories on the USB drive the link pointed to (one directory level up) could be reached while others could not. First I could not believe it but I tried it 3 times, when I reboot all the subdirectories can be accessed via the link pointing to a directory one level above those subs. How come ???

What I also noticed are many messages (a full page or so) while suspending to RAM and waking from it but it is so quick (something with "...soft reset failed...") you cannot read it. Do you know where I find a log about that ?

BTW: drives connected via Sata do not show this strange behaviour.

BR
George

I'm not surprised. I haven't had time to check, but I'd guess that what's happening when you resume from STR is that the SMB daemon starts up before the ACPI subsystem settles down, so the USB drive has not been mapped when samba starts. Can you try verifying this by manually restarting samba after a resume completes?
 
many thanks for your suggestion, I tried stopping and starting smb after the wake up but the behaviour does not change,

I think I maybe did not express myself clearly enough: the problem with the USB drives or their associated mounts respectively does not only appear via Samba but also locally, I believe your thoughts about USB drives not being mapped "in time" during/after wakeup or so might point into the right direction, I have the mount --binds inserted into the fstab as

"/data_disc4/Foto_Videoalbum /public/archive_backup/archive/Foto_Videoalbum none bind 0 0"

for example. The same procedure for sata drives shows absolutely no problems. Do you have any further ideas ?

BR
George
 
Sorry for the slow reply, I'm visiting my Stockholm office this week and it's been pretty hectic.

I'm still not clear what you are saying here, do the USB mounts not come back after resume from STR? Otherwise can you refer back to my earlier post, up the debug level and attach the logs to a new post please?

Thanks.
 
Dear hackinjack,

welcome back, I hope your trip to Stockholm was successful.

I strongly believe in the meantime that my problem is not Samba related. Let me give you a concrete example:
I have in my fstab commands like:
"/data_disc4/Foto_Videoalbum /public/archive_backup/archive/Foto_Videoalbum none bind 0 0"
where data_disc4 is a USB drive (but firmly connected and never changed to another USB channel)

After a real boot everything is fine: if I (locally on the Linux machine) click on /public/....album I see the data on data_disc4. After a wakeup from suspend the "link" created by this mound --bind is broken and the respective ...album is empty (of course not really because the data is still there). Somehow by the wakeup the pointers (or whatever it is inside the Linux) are gone.

How can I prevent that ?

BR
George
 

Members online


Top