Support » Installing WordPress » Your site is performing updates over FTP due to file ownership.

  • Resolved DavidB722


    I just moved my site to a new server. Server is Ubuntu 20.04. I’m seeing this error under Site Health:

    “Your site is performing updates over FTP due to file ownership.”

    Because I had cloned the git repo while logged in as root, everything in /var/www/html was owned by root (user and group). So, I changed the owner to a user with sudo perms:
    chown -R myuser:myuser html

    Confirmed file perms are 644, and directory perms are 755, but I’m still getting this error.

    Also tried changing user and group to www-data, but no success. Any assistance is appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • threadi


    Check out the article here:

    You have to set the user and group to values of your server environment, of course. Nobody knows them here. But the above mentioned article shows the direction.

    Thread Starter DavidB722


    Thanks for your reply. I feel like I’ve followed the direction in that article, but I’m obviously missing something.

    Changing the group of everything in html and opening file perms a bit restored the ability to upload media, so partial success there:

    chown -R :www-data html
    find html/ -type d -exec chmod 775 {} \;
    find html/ -type f -exec chmod 664 {} \;

    Those were at the recommendation of the above-linked article. Site health continues to give the same error, though, and I still can’t update plugins, etc.

    Thread Starter DavidB722


    Update: Late in the article referenced, it mentions su-php. This is a fresh Digital Ocean droplet, so I assumed su-php would not be running, however this seems to indicate that it is:

    ps aux | grep php-fpm
    root      155150  0.0  0.0   8156   656 pts/0    S+   17:41   0:00 grep --color=auto php-fpm

    That being the case, I changed ownership of all files in html back to root (which seems like a bad idea to me, but anyway). Still no change.

    Thread Starter DavidB722


    Ok, figured this out. The issue was with the user not being assigned to the correct group. What wasn’t making sense to me was that WordPress runs as the server (www-data on Ubuntu), so I didn’t think the user should own the files. The problem was that the user needed to be added to that group:

    sudo usermod -aG www-data $USER
    sudo chown -R www-data:www-data html

    (Ran under the user, not as root).

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.