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 am trying to configure my Centos 5.6 server. I've got apache up and running and want to be able to upload files via FTP.

I have installed vsftp.

I could login using my username and see the contents of the directory, but I couldn't actually upload any files to the directory.

In a tutorial on the Centos site, it recommended changing the settings of the web directory (in my case /var/www/html) as follows:

chown -R apache:myusername /var/www/html
chmod 460 /var/www/html
chmod g+S /var/www/html

Now I can't even get access to that directory with my username which is odd beause I thought the chown -R apache:myusername /var/www/html line would mean that I had permission.

Be grateful for any help as to how to go aout sorting this out.

I haven't touched the default vsftpd.conf file. I have enabled FTP in the firewall configuration. vsftpd service has been started.

Many thanks

share|improve this question
    
possible duplicate of FTP and Apache permission issues –  quanta Oct 6 '11 at 18:45

1 Answer 1

up vote 1 down vote accepted

Is it possible you where playing with group memberships and removed yourself from your own username group. The second argument to chown is the group not a user. Normally each user has a group by the same name as their user that is their primary group but that does not mean if you where trying to change your group membership at some point you did not accidentally remove yourself from your own group.

this will show you what groups you are in:

id username

I would also check the contents of the xferlog to see if their are any error messages.

cat /var/log/xferlog | less

Finally I would check if it is a SELinux issue. You can use the setenforce command to temporarily disable SELinux until the next reboot if it is enabled.

setenforce 0
share|improve this answer

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.