Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've searched a lot and I can't find a properly answer for my case. I think it has something to do with groups, but I can't discover a solution that fits me.

So here's the deal:

I have a home server on CentOS, and I use vsftpd.

I created a user miguel and made the default ftp location to var/www/html/ (as I'm the only user).

The question is - I have a php script which allows everyone on the internet to upload files to my server (in this moment, they're going to a folder called user_files, inside var/www/html). When I check locally the permissions of that folder, they are assigned to apache:apache. When I access via ftp with the user miguel I can't access/write on that folder.

How can I override all permissions, to give `miguel``, locally or via ftp, a "superaccess" permission to that folder?

Regards

share|improve this question

1 Answer 1

You could add miguel the the apache group and make sure the group has write access to the folder.

useradd -G apache miguel
chmod 764 -R /var/www/html

You might want to adapt chmod to fit your requirements.

share|improve this answer
    
Hello and thanks for the answer. But no, it didn't worked. miguel is already in the group apache and still doesn't have write permissions on that folder. –  Miguel Rasquinho Sep 16 '13 at 17:38
    
Are you sure your vsftpd does not jail your user so that you can never change directory to /var/www/html? This link might help you if you are unsure of what jailed is ubuntuforums.org/showthread.php?t=518293 –  Qben Sep 16 '13 at 20:46

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.