Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
/home/myvhost
[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

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

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: http://serverfault.com/questions/76341/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 ?

share|improve this answer
1  
Also, linking to the root folder in Apache makes me uneasy security wise. –  Kyle Brandt Oct 27 '09 at 15:37
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.