Problem wordpress update

Hi! I have a problem with updating wordpress.
The information pops up: Your server configuration prevents the product to be installed automatically.
Also in FTP you cannot replace files.
First I have to delete the old file and only then will I be able to upload the new file.
Anyone know how to solve this?

Sounds like wrong permissions, how did you installed your wordpress? Whats the output of ls -ll in the public_html directory?

drwxr-x–x 2 root root 4096 Nov 6 14:22 cgi-bin
drwxr-x–x 2 root root 4096 Nov 6 14:22 document_errors
dr-xr-x–x 2 root root 4096 Nov 6 14:22 logs
drwxr-x–x 2 root root 4096 Nov 6 14:22 private
drwxr-x–x 8 root www-data 4096 Nov 6 15:11 public_html
drwxr-x–x 2 root www-data 4096 Nov 6 14:22 public_shtml
dr-xr-x–x 2 root root 4096 Nov 6 14:22 stats

inside of public_html, not inside of /home/user/domain.tld.

-rw-r–r-- 1 root root 27 Sep 7 21:02 acbc9be770f6023f.html
drwxr-xr-x 2 root root 4096 Nov 6 14:41 cgi-bin
-rw-r–r-- 1 root root 53 Nov 2 22:01 google725991457a024905.html
-rw-r–r-- 1 root root 405 Sep 4 23:21 index.php
drwxr-xr-x 3 root root 4096 Nov 6 14:41 lang
-rw-r–r-- 1 root root 19915 Sep 4 23:21 license.txt
drwxr-xr-x 2 root root 4096 Nov 6 14:41 out
-rw-r–r-- 1 unweb unweb 995370438 Nov 6 14:41 public_html.zip
-rw-r–r-- 1 root root 7278 Oct 30 22:26 readme.html
-rw-r–r-- 1 root root 7101 Sep 4 23:21 wp-activate.php
drwxr-xr-x 9 root root 4096 Nov 6 14:41 wp-admin
-rw-r–r-- 1 root root 351 Sep 4 23:21 wp-blog-header.php
-rw-r–r-- 1 root root 2332 Sep 4 23:21 wp-comments-post.php
-rw-r–r-- 1 root root 2913 Sep 4 23:21 wp-config-sample.php
-rw-r–r-- 1 unweb unweb 3192 Nov 6 15:11 wp-config.php
drwxr-xr-x 8 root root 4096 Nov 6 14:41 wp-content
-rw-r–r-- 1 root root 3940 Sep 4 23:21 wp-cron.php
drwxr-xr-x 24 root root 12288 Nov 6 14:47 wp-includes
-rw-r–r-- 1 root root 2496 Sep 4 23:21 wp-links-opml.php
-rw-r–r-- 1 root root 3300 Sep 4 23:21 wp-load.php
-rw-r–r-- 1 root root 48761 Sep 4 23:21 wp-login.php
-rw-r–r-- 1 root root 8509 Sep 4 23:21 wp-mail.php
-rw-r–r-- 1 root root 20181 Sep 4 23:21 wp-settings.php
-rw-r–r-- 1 root root 31159 Sep 4 23:21 wp-signup.php
-rw-r–r-- 1 root root 4755 Sep 4 23:21 wp-trackback.php
-rw-r–r-- 1 root root 3236 Sep 4 23:21 xmlrpc.php
is that it?

root:root / root:www-data

This should be user:user or user:www-data

Do never use “root” or when you use it use It with caution…

1 Like

chown is something, you dont want to use - expect you know what you’re doing. In your case you fuc**d up your permission structure, please do a:

chmod user:user /home/user/web/domain.tld/public_html -R
chmod user:www-data /home/user/web/domain.tld/public_html

Replace user and domain.tld with your values and PLEASE don’t host anything under the admin user.

1 Like

chown user -R / public_html
fixed the problem.
Thanks