I have created an ftp account within a vhost and added a symbolic link to a folder situated in root e.g.

[root@server myvhost]# pwd
[root@server myvhost]# ll
lrwxrwxrwx  1 myvhost myvhost 16 Oct 27 15:03 myfolder -> /root/myfolder/

All files inside /root/myfolder/ including itself are chown'd to myvhost, but I am having issues when trying to upload files to this folder.

Is this simply impossible because of permissions or am I missing something.

Thanks in advance

1 Answer 1


Directory Permissions:
A user must be able to write to the directory to create files in that directory. So the user must have write permissions on the directory itself. The same goes for deleting files. They also need search 'x' permissions on all the directories leading up to that directory.

See the answers to this question: Filesystem permissions on Unix:

Directory Permissions:
Execute (Search) -- Enter into a directory
Write -- Create and delete files in that directory
Read -- List the files in the directory

The permissions on the link itself are meaningless, you need the permissions of the directory file itself (Directories are files too, with filename to inode mappings).

Language / Apache Safe Guard?:
Also, there are often guards against following symlinks. Look for (FollowSymLinks) in the Directory sections of Apache configurations, so check that. Your language might have something like that as well, php.ini ?

  • 1
    Also, linking to the root folder in Apache makes me uneasy security wise. Oct 27, 2009 at 15:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .