Thursday, February 19, 2009

Creating Symlinks

Symbolic links are useful when 'caging' users to their respective home directory but giving them access to directories outside their domain.

For example. A user john is jailed in his home directory /home/john

But we've created his web folder located in /var/www/html/john .. so how do we do this.

Go to the location where the link you want should appear.. In our example, we go to /home/john

Then type ln -s /var/www/html/john

You will see that in the directory, a john folder has been created and when you browse into that, you will see the contents in the directory /var/www/html/john ..

I personally used this for an ftp account for uploading web content.

If you are a web host you could run scripts in automating this for your users.