WordPress Connection Information for Updating Plugins and WordPress itself on CentOS 7

Hello everyone

What must I do to allow WordPress to update its plugins and itself? I have created a specific user for my site in the apache group. And I have ran the following command:

chown -R mysite-user:apache /var/www/html/mysite.co.uk

And when I do ls -l on /var/www/html I get:

drwxr-xr-x 5 mysite-user apache 4096 Mar 13 09:54 mysite.co.uk

In my mysite.co.uk.conf I have the AssignUserId set to mysite-user apache.

I do not know what else to do. Right now I can't update anything.

Any help would be greatly appreciated.

Comments

  • edited May 2018
    Had similar issues on WordPress Vultr App:

    An error occurred while updating Twenty Fifteen: The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions. comments.php, header.php, functions.php, footer.php, archive.php, js/customize-preview.js, js/skip-link-focus-fix.js, js/color-scheme-control.js, js/keyboard-image-navigation.js, js/functions.js, js/html5.js, content-none.php, rtl.css, css/ie7.css, css/editor-style.css, css/ie.css, inc/customizer.php, inc/template-tags.php, inc/back-compat.php, inc/custom-header.php, genericons/genericons.css, genericons/LICENSE.txt, genericons/Genericons.woff, genericons/Genericons.ttf, genericons/Genericons.eot, genericons/Genericons.svg, genericons/COPYING.txt, genericons/README.md, sidebar.php, content-page.php, content.php, content-link.php, content-search.php, search.php, readme.txt, style.css, author-bio.php, index.php, image.php, 404.php, single.php, page.php, screenshot.png

    This due to working with a new user for SFTP and PHP running in another group.
    ```
    ps aux | grep -i nginx
    nginx 3083 0.0 7.0 512144 72088 ? S May17 1:01 php-fpm: pool www
    nginx 4657 0.0 6.4 513764 65852 ? S May17 0:21 php-fpm: pool www
    ```
    user belongs to nginx and developer groups
    ```
    [developer@Unixserver conf.d]$ groups
    developer nginx
    ```
    Trying to solve this now as well. If you managed to do see please let me know.
  • edited May 2018
    This helped on the CentOS Vultr WP app

    # chown nginx:nginx * -R
    # usermod -a -G nginx username # developer in my case

    FYI php-fpm also runs as nginx
    grep "^user\|^group" /etc/php-fpm.d/www.conf
    user = nginx
    group = nginx

    Only now I still need to make sure developer can do all and won't change the ownership
  • edited May 2018
    In the end I did a chown developer:nginx * -R html/ as I want that user to be the owner so I can use that SFTP user as well. And then I adjusted php-fpm and made the user there developer as well
    ```
    grep "^user\|^group" /etc/php-fpm.d/www.conf
    user = developer
    group = nginx

    ```
    and restarted php-fpm `service php-fpm restart`

    also see https://github.com/Leo-G/DevopsWiki/wiki/How-to-Install---Wordpress-with-Nginx,-PHP-FPM-and-MariaDB-on-Ubuntu-14.04-(LEMP)
Sign In or Register to comment.