Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is not your classic programming question and since I'm quite new to this (really cool!) site, I'm not sure if this is the place, so I'll try anyway.

I work in a lab when all the guys use PCs with Windows and access the lab linux servers via ssh.

I prefer linux, so I have a local installation of ubuntu 10.4 on my PC. I mount the home of our lab server using mount server:/home /mnt/home/. I can then access the files on the server (I had to change my local UID to match the one assigned to me on our server in order to be able to write to my home dir).

The problem is all the (symbolic) links I have on the server don't work when I access them through the mounted location. I guess the system simply tries following the link in my local /home instead on server:/home.

Is there a way to make the links work?

Thanks, Dave

share|improve this question
please post the output of this command on server and client side: ls -al <thelink> – krissi Jul 26 '10 at 7:51
server side: lrwxrwxrwx 1 dave ldap users 43 Jul 25 14:31 code -> /home/dave/workspace/proj1/code/ (in green) client side: lrwxrwxrwx 1 dave dave-users 43 Jul 25 14:31 code -> /home/dave/workspace/proj1/code/ (in blue) – David Breimann Jul 26 '10 at 8:33

Your symlinks are pointing absolute to /home/dave/... On server side you have the directory structure. on client side the symlink points to exactly the same path.

so there are 3 possible ways:

The best solution is to always use relative symlinks where possible. If the directory with the symlink contains is e.g. /home/dave then the symlink target path should be workspace/proj1/code. If it is in /home/dave/my_current_project it could be ../workspace/proj1/code. But sometimes this is not possible or simply not wanted.

The second solution is to mount /home from server into /home on client side. Also, this is sometimes unwanted.

The third solution is, to create a symlink on both sides and make all links relative to it. Do this by creating a symlink in e.g. /var/local named home which links on serverside to /home and on client side to /mnt/home. Now change all symlinks on the server from /home/dave/... to /var/local/home/dave/....

The best solution in my opinion is the first, then the second and the last is a fallback which complicated the work for the user and may lead to faulty links in the future

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.