Web Hosting Talk







View Full Version : Symlink woes


highlander
07-15-2001, 11:41 AM
I have been trying to setup a symlink for the first time and have hit problems with the permissions.

The symlink is for a directory of site2 called ssl and it links to the web directory of site17. I did this from root using the command ln -s /home/sites/site17/web /home/sites/site2/web/ssl and all seemed OK.

However logging on as a user of site2 in FTP I am unable to follow the symlink, the error message says "550 ssl : No such file or directory". However if I log on as admin the symlink works properly.

This suggests to me that it is permissions related, but I just cant figure it out. Anyone got any clues for me?

Robert

jtan15
07-15-2001, 02:09 PM
When you login via FTP as admin, you can "cd /" and view the root directory of your server, /bin, /var/, /usr, etc.

When you login as a normal user, your document root (/), changes to your home directory (I'm pretty sure this is how they do it -- someone correct me if I am wrong).

So /home/sites/site2 is now your document root, or /. So you are trying to cd /home/sites/site17/web. It does exist on your system, but proFTP's chroot stops you from getting that low.

Solution? Open /etc/proftpd.conf and add this line:

DocumentRoot / USERNAME

USERNAME should be replaced with the FTP username that cannot change the directory for you.

huck
07-16-2001, 08:31 AM
Try typing the full path into your FTP client. Unless you are chrooted, you should be able to transverse into another directory. However, you may have to specify the full path in your FTP client.

Also, check permissions. If you made the symlink as admin or root and did not change the permissions, then then they might be incorrect. Run: 'ls -l' to list the files and check who owns the symlink -- if this is admin or root, chown it to the appropriate user. Also, remember to change the group (chgrp).