niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » Setup
Samba and symlinks
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
Author Message
Jules
*nix forums addict


Joined: 20 Feb 2005
Posts: 63

PostPosted: Wed Feb 02, 2005 9:03 pm    Post subject: Samba and symlinks Reply with quote

I'm running Slackware 10 and Samba 3.0.4 and would like to present files
spread across a couple of drives under the one Samba share if possible.

The man page for smb.conf suggests that enabling 'wide links' and 'follow
symlinks' in smb.conf should do this. However from my client (also a
Slackware box) I just see the symlinks as though they were referencing
files on my local disk; I was hoping the Samba server would present the
actual files that the symlinks point to.

(I do have a couple of Windows machines that I occasionally access data
with, which is why I'm not using NFS :-)

Interestingly, smb.conf man page says that 'wide links' and 'follow
symlinks' should be declared at the share level, yet no matter where I put
them testparm doesn't show them as being present (yes I've checked
that everything's using the right config file). In theory it shouldn't
matter though as both those options should be enabled by default anyway -
they just don't seem to work...

Any ideas?

cheers

Jules
Back to top
Laurenz Albe
*nix forums Guru


Joined: 21 Feb 2005
Posts: 478

PostPosted: Thu Feb 03, 2005 9:44 am    Post subject: Re: Samba and symlinks Reply with quote

Jules <julesrichardsonuk@remove.this.yahoo.co.uk> wrote:
Quote:
I'm running Slackware 10 and Samba 3.0.4 and would like to present files
spread across a couple of drives under the one Samba share if possible.

I am using Samba 2.2.8 on Slackware 9, no problems here.

Quote:
The man page for smb.conf suggests that enabling 'wide links' and 'follow
symlinks' in smb.conf should do this. However from my client (also a
Slackware box) I just see the symlinks as though they were referencing
files on my local disk; I was hoping the Samba server would present the
actual files that the symlinks point to.

The Samba documentation says that these parameters are set to 'Yes' by
default, so you could just omit them from your share definition.

What happens if you use 'get' in smbclient to transfer the symlink to
the client machine? If you get the file the symlink points to on your
server, all is fine.
If not, what do you get?

Quote:
Interestingly, smb.conf man page says that 'wide links' and 'follow
symlinks' should be declared at the share level, yet no matter where I put
them testparm doesn't show them as being present (yes I've checked
that everything's using the right config file). In theory it shouldn't
matter though as both those options should be enabled by default anyway -
they just don't seem to work...

I've played with setting the parameters to 'Yes' in my config file, no
change in behaviour.
When I set them to 'No', it behaves as expected.

Like you, I observe that 'testparm' doesn't show a 'wide links = Yes'
option, even if I don't give it -x.

Maybe your problem lies somewhere else; would you show us the definition
of the share in question in your smb.conf file?

Yours,
Laurenz Albe
Back to top
Jules
*nix forums addict


Joined: 20 Feb 2005
Posts: 63

PostPosted: Thu Feb 03, 2005 1:23 pm    Post subject: Re: Samba and symlinks Reply with quote

On Thu, 03 Feb 2005 09:44:59 +0000, Laurenz Albe wrote:

Quote:
Jules <julesrichardsonuk@remove.this.yahoo.co.uk> wrote:
I'm running Slackware 10 and Samba 3.0.4 and would like to present files
spread across a couple of drives under the one Samba share if possible.

I am using Samba 2.2.8 on Slackware 9, no problems here.

I've done some more digging around about this - there's a lot of people
out there having the same problems, and not many answers it seems. Some
people (like you) have no trouble and it works as expected.

It seems to be particular combinations of client and server software that
cause it to fail. Old versions of the client are fine talking to newer
versions of the server, and new versions of the client work fine with old
versions of the server - but get a particular combination together and
things go wrong :-(

FWIW, I've just tested it and it's fine from a Windows machine (i.e.
browsing a share, I see the files the links point to, not links). I
*think* it's something to do with CIFS support; either the client or
server in Linux is spotting that the client machine is Unix, realising
that Unix supports links, and presenting the links under the share rather
than the files that the links point to.

Unfortunately there seems to be no way to turn this behaviour off in
smbmount. I did see mention of being able to disable unix
extensions within the server, which I'll try (and report back).

Failing that there is a mount.cifs program which *might* work, but I'm
having trouble so far finding documentation on exactly what bits I need
on the client for it to work, or any prepackaged source or binaries.
Despite Slackware 10 having the man page for it, it *doesn't* have the
binaries or necessary filesystem support it seems Sad (Googling around
that suggests that it's a bug in the Samba release)

Quote:
What happens if you use 'get' in smbclient to transfer the symlink to
the client machine? If you get the file the symlink points to on your
server, all is fine. If not, what do you get?

Hmm. smbclient gets the actual file, not the link - in other words it
behaves as a windows client does (and gives the behaviour I want).

But smbmount breaks and presents links rather than the files. Very
strange how the behaviour's different between the two.

Quote:
Like you, I observe that 'testparm' doesn't show a 'wide links = Yes'
option, even if I don't give it -x.

That's reassuring at least; I was triple-checking that I wasn't picking up
the wrong config file yesterday. Glad it's somewhat broken on someone
else's machine too.

I'll try turning unix extensions off in the server; if that doesn't work
I'll have another look around for mount.cifs for Slackware...

cheers

Jules
Back to top
Jules
*nix forums addict


Joined: 20 Feb 2005
Posts: 63

PostPosted: Thu Feb 03, 2005 3:03 pm    Post subject: Re: Samba and symlinks Reply with quote

On Thu, 03 Feb 2005 14:23:12 +0000, Jules wrote:

Quote:
On Thu, 03 Feb 2005 09:44:59 +0000, Laurenz Albe wrote:

Jules <julesrichardsonuk@remove.this.yahoo.co.uk> wrote:
Unfortunately there seems to be no way to turn this behaviour off in
smbmount. I did see mention of being able to disable unix
extensions within the server, which I'll try (and report back)

That seems to have fixed it Smile I wonder why Google turned up so many posts
from people asking this and the solution wasn't well documented...

cheers!

Jules
Back to top
prg
*nix forums Guru Wannabe


Joined: 23 Feb 2005
Posts: 235

PostPosted: Thu Feb 03, 2005 3:46 pm    Post subject: Re: Samba and symlinks Reply with quote

Jules wrote:
Quote:
On Thu, 03 Feb 2005 09:44:59 +0000, Laurenz Albe wrote:

Jules <julesrichardsonuk@remove.this.yahoo.co.uk> wrote:
[snip]
FWIW, I've just tested it and it's fine from a Windows machine (i.e.
browsing a share, I see the files the links point to, not links).

This is standard _Windows_ behavior (actually an illusion). No files
are actually copied/moved, the files are not "present" at the location
of the link, Windows just displays the name of the linked-to file
automagically.

Quote:
I
*think* it's something to do with CIFS support; either the client or
server in Linux is spotting that the client machine is Unix,
realising
that Unix supports links, and presenting the links under the share
rather
than the files that the links point to.

You need to be clear just _how_ you are accessing the Samba shares from
Linux as they are not equivalent. Eg., smbmount is available only on
Linux and it "translates" Win behavior (or in this case, fails to) to
be more consistent with Linux filesystem behavior. Thus links will
show as links, not as the files they point to -- just as links are
treated for other Linux fs types. Links _may_ be followed when you
_access_ them with the 'follow symlinks' set in smb.conf, not when you
simply _list_ directory contents. This is why link names are usually
the same as the filename to provide a measure of transparency. The
link creator must provide this.

Quote:
Unfortunately there seems to be no way to turn this behaviour off in
smbmount. I did see mention of being able to disable unix
extensions within the server, which I'll try (and report back).

Can't remember about this one. In any case, your problem has to do
with smbmount -- if that's the way you are accessing the Samba share.
The server sends the same data over the wire (as it must to "conform"
to NB/CIFS). The smbmount code, otoh, _knows_ it's running on Linux
(since it only runs on Linux) and uses the data to be most consistent
with Linux fs behavior. The assumption being that this would also be
the most useful. Not so for your tastes.

Quote:
Failing that there is a mount.cifs program which *might* work, but
I'm
having trouble so far finding documentation on exactly what bits I
need
on the client for it to work, or any prepackaged source or binaries.
Despite Slackware 10 having the man page for it, it *doesn't* have
the
binaries or necessary filesystem support it seems Sad (Googling
around
that suggests that it's a bug in the Samba release)

What happens if you use 'get' in smbclient to transfer the symlink
to
the client machine? If you get the file the symlink points to on
your
server, all is fine. If not, what do you get?

Hmm. smbclient gets the actual file, not the link - in other words it
behaves as a windows client does (and gives the behaviour I want).

Because you are following the link to _access_ the file the link points
to. Standard Linux behavior. Standard behavior for FTP (which
smbclient is modeled on in some respects).

Quote:
But smbmount breaks and presents links rather than the files. Very
strange how the behaviour's different between the two.

Linux is not Windows. The treatment of all sorts of filesystem objects
and attributes differs. It would be _inconsistent_ to have one part of
the filesystem tree on Linux behave in the standard Linux fashion and
some other portion comform to Windows behavior.

Quote:
Like you, I observe that 'testparm' doesn't show a 'wide links =
Yes'
option, even if I don't give it -x.

From your first post:
[q]

However from my client (also a Slackware box) I just see the symlinks
as though they were referencing files on my local disk; I was hoping
the Samba server would present the actual files that the symlinks point
to.
[eq]
This is how smbmount is designed to behave. It is not designed to
behave as your stated wish to behave as a Windows box.

I may not be understanding your "problem" (would not be the first time
with my dense skull).

I also don't have Samba shares available or any Samba components loaded
on this machine I'm using, so can't do any quick tests to _see_ if I am
understanding your situation.

If you are using a gui client on your Linux box, I can't remember how
all of them handle this. Windows users are often bewildered by this
explict reminder of the distinction between links and files, especially
if they use the default setup that "hides" known filetype extensions.

If I'm completely offbase just s*&tcan this and tell me to go play with
my own toys.

hth (if not, ignore it;)
prg
email above disabled
Back to top
Laurenz Albe
*nix forums Guru


Joined: 21 Feb 2005
Posts: 478

PostPosted: Fri Feb 04, 2005 9:33 am    Post subject: Re: Samba and symlinks Reply with quote

Jules <julesrichardsonuk@remove.this.yahoo.co.uk> wrote:
Quote:
Unfortunately there seems to be no way to turn this behaviour off in
smbmount. I did see mention of being able to disable unix
extensions within the server, which I'll try (and report back).

Oh, I didn't realize that you were using smbmount...
I just tested that too, and it also works - but I have 'unix extensions'
unset (which, as you mention in your followup, caused the observed
behaviour).

Have you considered using NFS? You could have the Samba share NFS exported
and use NFS from UNIX clients. Maybe that would improve things.

Yours,
Laurenz Albe
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [6 Posts] View previous topic :: View next topic
The time now is Fri Jan 09, 2009 1:55 am | All times are GMT
navigation Forum index » *nix » Linux » Setup
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Samba file transfers slow from Linux to Windows. Mark Storkamp networking 1 Mon Jul 17, 2006 11:53 pm
No new posts Is samba available any more for 6.1? Tim Jones FreeBSD 2 Thu Jul 13, 2006 12:46 pm
No new posts Please Help! Samba Domain Issues Chefy Tim Mandrake 0 Wed Jul 12, 2006 1:48 am
No new posts mount command need help mounting samba share Mike AIX 3 Mon Jul 10, 2006 10:32 pm
No new posts samba with ActiveDirectory authentication on AIX 4.3.3 Joachim Gann AIX 0 Thu Jul 06, 2006 1:17 pm

Bankruptcy | Sprint Ringtones | Web Advertising | Actress | Rebuildable cars
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1605s ][ Queries: 16 (0.0544s) ][ GZIP on - Debug on ]