Friday, March 10, 2017

file permissions - Cannot read/write FTP directory vsftpd on centos 6.0 (empty folder)



I have Centos 6.0 and installed vsftp with YUM, I added a user with Webmin panel, set its home dir to "/var/www/html" and its shell to "/bin/sh", user id is 500, user group is same as name: "adrian_ftp".



When I start a ftp program it logs in but the remote folder always shows empty.

I set directory owner and group to adrian_ftp:adrian_ftp , no change, I also made them 0777, no change.



Any ideas? I tried for over 3-4 hours :|


Answer



It's selinux for 99 % ;-)



# getenforce
Enforcing



Turn it off by:



# setenforce 0
# vim /etc/sysconfig/selinux


And set it to "disabled" in that file or "permissive" if you plan to turn it on sometime in future or you want to track selinux errors.



For FTP I highly recommend NOT to turn it off. Follow the RHEL 6 guides how to set it up properly for a FTP site.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...