Why is my dir not showing in ftp session?

I am new to linux so please have patience with me.

I set up my centos 6.3 server on a virtual machine, installed many things including httpd and vsftpd.

I changed the config to allow only users in the chroot_list and the other settings are as usually recommended on the net.

I created a user "adduser -d /var/www wwwftpuser" then did a passwd.

I am able to connect to this now using an ftp client on my virtual machine host. But… the directory is blank. I tried uploading a file to it but the directory on the linux machine does not see the new file.

My aim is to upload and amend files in /var/www using ftp.

Why is this so?

Answer

No thanks to the down voter, at least say why you down voted.

I found the answer eventually, there is something called SELinux that was blocking access to the chrooted directory.

So I did :

setsebool -P ftp_home_dir on

Which sorted the problem out, now I see the files. I am just testing so its ok for me but I do not recommend anyone does this if they do not know what it does.

Attribution
Source : Link , Question Author : sprocket12 , Answer Author : sprocket12

Leave a Comment