Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

NFS Access to symlinks?

2,030 views
Skip to first unread message

Bruce

unread,
May 30, 2002, 9:19:34 AM5/30/02
to
I have an NFS server running on RH 7.2. The share includes a symlink to
another folder. I would like the clients to have access to the linked
folder, but the clients can't access them:

client:/nfsserver/share# ls -l linked_folder
lrwxrwxrwx 1 99 users 19 Mar 20 16:12 linked_folder ->
/some/other/folder/on/server
client:/nfsserver/share# cd linked_folder
bash: cd: linked_folder: No such file or directory
client:/nfsserver/share#

I couldn't find any mention of symlinks in the NFS documentation. Is there
an equivalent to the Samba option

follow symlinks = yes

for NFS? Is there some other solution??

Thanks,

Bruce

Dragan Colak

unread,
May 30, 2002, 11:20:21 AM5/30/02
to
Bruce wrote:

NFS is a quite simple piece of software. It doesn't care about links and it
doesn't let you specify how to handle them. A remote link is processed the
same way as a local.

Not having sufficient permissions to access a directory would result in
'Permission denied'.

But your error message indicates that either the target folder doesn't
exist or you mistyped it when you created the link.

Dragan

Bill Stapleton

unread,
May 30, 2002, 2:46:11 PM5/30/02
to
In article <ad5g00$u340d$1...@ID-72169.news.dfncis.de>,
Dragan Colak <dragan...@gmx.de> writes:

|> Bruce wrote:

|> > I have an NFS server running on RH 7.2. The share includes a symlink to
|> > another folder. I would like the clients to have access to the linked
|> > folder, but the clients can't access them:
|> >
|> > client:/nfsserver/share# ls -l linked_folder
|> > lrwxrwxrwx 1 99 users 19 Mar 20 16:12 linked_folder ->
|> > /some/other/folder/on/server

NFS doesn't do symlinks, a symlink is simply another file as far as it's
concerned. The client machine has to decide how to handle the symlink.
There are a few potential problems with the above link:

1. The link starts with a slash, so is based on the root OF THE CLIENT.
So, it won't work if the client doesn't have the right /some/...
stuff.

2. That /some/... must be in one of the trees you NFS export on the
server, or the client won't be able to get at it anyways, even
with a correct path. NFS won't export another directory just
because you have a symlink pointing to it.

You might be able to do what you want with relative symlinks, but you have to
be careful that you don't accidentally go "up" past the point of the NFS
mount, because then again you'll be pointing to the client's files instead of
the servers. So, if this /some/... is inside the NFS-mounted directory, then
perhaps "../some/other/folder/on/server" would get you there, and that should
work on both sides (unless you're already at the top NFS mount point, where
".." then points OUTSIDE the NFSed area). If that isn't feasable, you might
have to mount /some/... separately.

Sorry if this has been discussed already, I missed any previous articles in
this thread.

|> > client:/nfsserver/share# cd linked_folder
|> > bash: cd: linked_folder: No such file or directory
|> > client:/nfsserver/share#
|> >
|> > I couldn't find any mention of symlinks in the NFS documentation. Is there
|> > an equivalent to the Samba option
|> >
|> > follow symlinks = yes
|> >
|> > for NFS? Is there some other solution??
|> >
|> > Thanks,
|> >
|> > Bruce

|> NFS is a quite simple piece of software. It doesn't care about links and it
|> doesn't let you specify how to handle them. A remote link is processed the
|> same way as a local.
|>
|> Not having sufficient permissions to access a directory would result in
|> 'Permission denied'.
|>
|> But your error message indicates that either the target folder doesn't
|> exist or you mistyped it when you created the link.

The file exists on the server, but the way he's symlinked it, it's looking
for it on the client...

|> Dragan


--
Bill Stapleton University of Wisconsin - Milwaukee
w...@uwm.edu Information & Media Technologies
Web Janitor, http://www.uwm.edu/ Technical Solutions

Bruce

unread,
Jun 5, 2002, 11:53:02 PM6/5/02
to
Thanks; you answered my question exactly. The nfs export was /home/shared/
on the server; there was a symlink in that folder pointing to
/var/spool/hylafax/recvq (where incoming faxes are stored by hylafax),
which of course was outside the tree of the nfs export.

I will muck around with a bit more, but figure I can just add another nfs
export for the actual recvq directory to find the files.

Thanks.

Bill Stapleton wrote:

> In article <ad5g00$u340d$1...@ID-72169.news.dfncis.de>,
> Dragan Colak <dragan...@gmx.de> writes:
>
> |> Bruce wrote:
>
> |> > I have an NFS server running on RH 7.2. The share includes a symlink
> |> > to another folder. I would like the clients to have access to the
> |> > linked folder, but the clients can't access them:
> |> >
> |> > client:/nfsserver/share# ls -l linked_folder
> |> > lrwxrwxrwx 1 99 users 19 Mar 20 16:12 linked_folder
> |> > -> /some/other/folder/on/server
>

<snip>


>
> You might be able to do what you want with relative symlinks, but you have
> to be careful that you don't accidentally go "up" past the point of the
> NFS mount, because then again you'll be pointing to the client's files
> instead of
> the servers.

<snip>

0 new messages