How to Create a Symbolic Link to a Mounted Volume

Derek Broughton derek at pointerstop.ca
Sun Feb 1 18:47:52 UTC 2009


Markus Schönhaber wrote:

> Derek Broughton:
>> Markus Schönhaber wrote:
>> 
>>> Dom Incollingo:
>>>
>>>> I mounted a home directory from another computer via sftp.  The
>>>> directory is mounted as:
>>>>
>>>>             sftp://dji@linux/home/dji.
>>>> I tried to make a symbolic link to this directory by running  the
>>>> command
>>>>
>>>>           ln -s sftp://dji@linux/home/dji  anotherHome
>>> You can't create usable symlinks pointing to somewhere outside the
>>> filesystem tree.
>> 
>> Of course, you really can,
> 
> No, you can't (notice the word "useful").

Well, you didn't actually _say_ "useful", you said "usable", and yes, 
they're definitely usable.  I maintain that they're also _useful_.
> 
>> but the other filesystem must be _mounted_ into
>> your hierarchy.
> 
> Which means that it's *not* *outside* filesystem tree any more.

Well, now, that's an interesting splitting of hairs - in fact they are, by 
any definition I've ever read outside the _filesystem_ - they're in your local 
directory tree, yes, but not your _filesystem_ tree.  I'd have no 
disagreement if you'd said "filesystems tree".

>>  My /etc/fstab has a number of entries like:
>> //DOMAIN/SHARE /home/derek/DOM_MOUNT cifs \
>>    noauto,user,credentials=/home/derek/.cred,rw 0 0
>> 
>> and after I "mount ~/DOM_MOUNT" I can treat it like a local mount -
>> including making symlinks to files in its own filesystem.
> 
> I already gave the OP one possible solution to create a symlink that is
> actually usable pointing to the sftp server's file system.

Yes you did.  And I agree with it.  That doesn't mean that the above isn't a 
useful or usable concept.

> I'm too lazy to check now, but I'd be surprised if no-one had written
> something (for example using FUSE) that really mounts a sftp filesystem,
> which might be a more adequate tool for the job.

I didn't find anything while looking at FUSE filesystems last week, but then I 
wasn't specifically looking for ftp:






More information about the ubuntu-users mailing list