I have an issue i've been trying to fix for two days now. I've searched the web and tried to apply multiple suggestions from other posters.
So i have a self hosting web server: CentOS7, Apache, PHP, MariaDB, OpenSSH and Pure-FTPd.
I found a nice guide combining MariaDB and pure-FTPd. I used vsftp beforehand but later found the use of database to store valid FTP users more robust and convenient.
So, I've successfully set-up ftp server and logged in with FileZilla from a remote client. I also managed to copy files and create folder in "wp-content" folder of wordpress. However when i try to use WordPress's in-house FTP solution i get a "Failed to connect to FTP Server" error. I managed to upload plugins using:
define('FSMETHOD', 'direct');
option in wp-config.php
file. That worked and plugin was successfully installed. However i read that this is not a safe option. I am aware that plane FTP is not the safe way as well but i wanna make that work first before moving to FTPS variant.
I also tried pasting this block in wp-config.php
(pre-filled FTP data basically):
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/path/to/wordpress/');
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'ftp.example');
define('FTP_SSL', false);
But that also didn't work.
Tl.dr.: FTP works fine with FileZilla (can connect to server and see wp folder) however using WP in-house ftp solution gives an error.
I tried all folders setting ownership "apache:apache" as well as myUser:myGroup (Apache being part of my group). WordPress permissions:
find /var/www/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;
as well as
find /var/www/ -type d -exec chmod 775 {} \;
find /var/www/ -type f -exec chmod 664 {} \;
Nothing worked. I am really running out of ideas here.
I have an issue i've been trying to fix for two days now. I've searched the web and tried to apply multiple suggestions from other posters.
So i have a self hosting web server: CentOS7, Apache, PHP, MariaDB, OpenSSH and Pure-FTPd.
I found a nice guide combining MariaDB and pure-FTPd. I used vsftp beforehand but later found the use of database to store valid FTP users more robust and convenient.
So, I've successfully set-up ftp server and logged in with FileZilla from a remote client. I also managed to copy files and create folder in "wp-content" folder of wordpress. However when i try to use WordPress's in-house FTP solution i get a "Failed to connect to FTP Server" error. I managed to upload plugins using:
define('FSMETHOD', 'direct');
option in wp-config.php
file. That worked and plugin was successfully installed. However i read that this is not a safe option. I am aware that plane FTP is not the safe way as well but i wanna make that work first before moving to FTPS variant.
I also tried pasting this block in wp-config.php
(pre-filled FTP data basically):
define('FS_METHOD', 'ftpext');
define('FTP_BASE', '/path/to/wordpress/');
define('FTP_CONTENT_DIR', '/path/to/wordpress/wp-content/');
define('FTP_PLUGIN_DIR ', '/path/to/wordpress/wp-content/plugins/');
define('FTP_USER', 'username');
define('FTP_PASS', 'password');
define('FTP_HOST', 'ftp.example');
define('FTP_SSL', false);
But that also didn't work.
Tl.dr.: FTP works fine with FileZilla (can connect to server and see wp folder) however using WP in-house ftp solution gives an error.
I tried all folders setting ownership "apache:apache" as well as myUser:myGroup (Apache being part of my group). WordPress permissions:
find /var/www/ -type d -exec chmod 755 {} \;
find /var/www/ -type f -exec chmod 644 {} \;
as well as
find /var/www/ -type d -exec chmod 775 {} \;
find /var/www/ -type f -exec chmod 664 {} \;
Nothing worked. I am really running out of ideas here.
Share Improve this question edited Mar 17, 2019 at 12:04 fuxia♦ 107k39 gold badges255 silver badges459 bronze badges asked Mar 16, 2019 at 21:24 user121040user121040 111 silver badge2 bronze badges 3 |1 Answer
Reset to default 1After two days of head banging, found out it's the SELinux giving me the issues.
Usually i got a message from it saying what and why was blocked, provided with a command to enable the action that SELinux was preventing. Like when apache wasn't able to write logs to my virtual host folder... This time around i got no such message so it didn't cross my mind it was SELinux-s fault.
I ended up turning SELinux off altogether as i saw CPannel doesn't function with it being enabled (i intend to use CPannel or smth equivalent down the line).
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745160574a4614372.html
chown -R user:group /path/to/wordpress/
... otherwise look intorequest_filesystem_credentials
function to debug what test is actually failing and preventing direct writing. – majick Commented Mar 17, 2019 at 5:20vsftpd
which never delivers a problem. – Max Yudin Commented Mar 17, 2019 at 5:22