This question could be all around but I have tried most answers and permission 777. But, still no luck.
/etc/apache2/sites-available/mysite.conf
<VirtualHost *:80>
ServerName www.mysite.com
ServerAdmin [email protected]
DocumentRoot /var/www/html/wordpress
ErrorLog ${APACHE_LOG_DIR}/mysite_error.log
CustomLog ${APACHE_LOG_DIR}/mysite.log combined
</VirtualHost>
/etc/vsftpd.conf
listen=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
allow_writeable_chroot=YES
I set permission 777 to /usr/share/wordpress and /var/lib/wordpress.
The update creates a directory in wp-content/update inside the site directory. Linux does not set permissions automatically of child directories to those of the parent. Therefore wp-content/upload will not necessarily have 777 permissions.
Try change permissions of wp-content/update to 777. If this works it means that the owner of the WordPress folders is not the the user trying to update the site.
What worked for me was to add my ftp client to the group that the owner of the WordPress process. (How do I know which linux user Wordpress uses for plugin installation) to find the owner. and then set all directories to 775 permissions and files to 665 in the site directory.
chmod 775 $(find -type d)
chmod 665 $(find -type f)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With