Web Hosting Talk







View Full Version : Symlinking /usr/lib -> /home/sys/lib


Pillhead
11-10-2001, 09:51 AM
Anyone know why symlinking /usr/lib to another directory will make perl unable to find files ?

I did the symlink all correct, but it says it cannot find the files needed.

For example "Can't locate strict.pm", now the include directory includes this /usr/lib/perl5/5.6.1

So I do 'cd /usr/lib/perl5/5.6.1', then do 'ls' and it clearly shows the 'strict.pm' file there, so the symlink is all working, fine.

To fix it I had to recopy the lib folder back to /usr/lib, why wont the symlink work ?

Pillhead
11-10-2001, 10:14 AM
It was a permissions thing, see I made /home/sys chmod 700 to root, so perl, when not run as root was not able to access /home/sys/lib!

So now ive changed it to 755 and it all works :)

In the words of Homer DOH!

PPN
11-13-2001, 06:19 PM
hmm i can't get it to work with mine i type

ln -d /home/sys/lib /usr/lib

and i get
Invalid cross-device link
as an error

Pillhead
11-14-2001, 08:42 AM
Firsty your using the -d parameter (hard link su only) and both the directorys are on different filesystems.

Your statement - 'ln -d /home/sys/lib /usr/lib'

Perhaps you want to do this - 'ln -s /home/sys/lib /usr/lib'

This will link the directory /usr/lib to teh directory /home/sys/lib, using teh softlink option (-s).

Please make sure that you have copied the contents of /usr/lib to /home/sys/lib before doing this.

This has all worked for me okay up to now, hope it works for you!

Also note that doing this you should be cautious not to loose your telnet session, as you may not be able to get back in.

Because you have to move the /usr/lib directory to /home/sys/lib, if you loose your connection whilst doing this, you may find that access to the box is dependant on some of the libraries found in /usr/lib.

PPN
11-14-2001, 03:02 PM
thanks got it to work and it cleared up alot of space on that partition now :)