Wordpress Plugin Install/Update Asks for FTP Details - Unix-Centos 7
This happens when the user owns the wordpress directory is different than the user running the Wordpress site.
In simply, the web server (apache/nginx) is not having the ownership to wordpress directory. So the user running the web server does not have permissions.
Check the user running apache:
ps aux | grep apache2
ps aux | grep apache2
first column display the user name
Check the owner of the Wordpress directory
ls -l
If they are different, set the ownership of the Wordpress directory the the user running Apache.
sudo chown -R user:usergroup foldername
When this permission is set your plugins will be installed without asking FTP permissions.
But still asking for FTP permissions with the Wordpress upgrade in CentOs7 start SELinux by default. Run the following command.
sudo set enforce 0
References:
https://www.digitalocean.com/community/questions/wordpress-asking-for-ftp-credentials
http://wordpress.stackexchange.com/questions/162002/upgrading-wordpress-4-0-asks-for-ftp-password
https://wordpress.org/support/topic/filedirectory-permissions-on-centos/
ls -l
If they are different, set the ownership of the Wordpress directory the the user running Apache.
sudo chown -R user:usergroup foldername
When this permission is set your plugins will be installed without asking FTP permissions.
But still asking for FTP permissions with the Wordpress upgrade in CentOs7 start SELinux by default. Run the following command.
sudo set enforce 0
References:
https://www.digitalocean.com/community/questions/wordpress-asking-for-ftp-credentials
http://wordpress.stackexchange.com/questions/162002/upgrading-wordpress-4-0-asks-for-ftp-password
https://wordpress.org/support/topic/filedirectory-permissions-on-centos/