0

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

Joe
  • 201
  • 1
  • 4
  • 13
  • possible duplicate of [FTP and Apache permission issues](http://serverfault.com/questions/184548/ftp-and-apache-permission-issues) – quanta Oct 06 '11 at 18:45

1 Answers1

1

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
digitaladdictions
  • 1,505
  • 1
  • 12
  • 30