Hello,
I have a fresh install of Centos 7.5, installed LAMP and all seems to be working fine,
Site is running from /var/www/html/
However, when i login to FTP, i cant see that directory, according to my FTP client /var/ is empty...
I really dont like having to do all my uploading and editing through shell, how can i get access to that folder via FTP? Server is vsftpd.
Thanks in advance!
Cant see /var/www/html when logging in to FTP
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: Cant see /var/www/html when logging in to FTP
SELINUX is preventing the access.If you wish to allow access for both FTP and HTTP you need to relabel the location and allow both FTP and HTTP daemons to use it.
So in your case it should be something like (public_content_t -> read-only,public_content_rw_t-> rw):
In order to debug SELINUX issues you can:
1.Install necessary software:
2.Run sealert against the logs:
Edit: fixed the second 'setsebool' command
So in your case it should be something like (public_content_t -> read-only,public_content_rw_t-> rw):
Code: Select all
yum install policycoreutils-{python,devel}
semanage fcontext -a -t public_content_rw_t "/var/www/html(/.*)?"
restorecon -RFvv /var/www/html
setsebool -P allow_ftpd_anon_write on
setsebool -P allow_httpd_anon_write on
1.Install necessary software:
Code: Select all
yum install setroubleshoot-server
Code: Select all
sealert -a /var/log/audit/audit.log
Re: Cant see /var/www/html when logging in to FTP
FTP is insecure.
If you're on a windows client use e.g. filezilla or winscp in ssh mode.
If you're on a windows client use e.g. filezilla or winscp in ssh mode.