• Resolved purityboy83

    (@purityboy83)


    Hi

    The owner of the generated cache file is created as root

    I am running nginx and php-fpm as a normal user (not root) (username nginx)

    # ps -ef| grep php
    root     25913     1  0 09:40 ?        00:00:02 php-fpm: master process (......php80/php-fpm.conf)
    nginx     9786 25913  1 11:03 ?        00:00:00 php-fpm: pool www
    nginx     9854 25913  2 11:03 ?        00:00:00 php-fpm: pool www
    nginx     9862 25913  3 11:03 ?        00:00:00 php-fpm: pool www
    nginx     9887 25913  0 11:03 ?        00:00:00 php-fpm: pool www
    nginx     9919 25913  0 11:03 ?        00:00:00 php-fpm: pool www
    
    ]# ps -ef| grep nginx
    root     17044     1  0 08:15 ?        00:00:01 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
    nginx     4021 17044  0 10:43 ?        00:00:07 nginx: worker process
    nginx     4022 17044  0 10:43 ?        00:00:02 nginx: worker process
    nginx     4023 17044  0 10:43 ?        00:00:05 nginx: worker process
    nginx     4024 17044  0 10:43 ?        00:00:05 nginx: worker process

    Cache file creation is done by root user.
    drwxr-xr-x. 2 root root 62 Oct 1 11:05 16853

    # pwd
    …../wp-content/cache/wpo-cache/[MYSITENAME]/archives

    Can I get help with this?

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • @purityboy83 I’ll check this with our development team and update you soon.

    Thank you for your time and patience.

    Plugin Author David Anderson

    (@davidanderson)

    Under the POSIX security model, non-root processes can’t create files that are owned by root, whether they want to or not. (If they could, this would allow complete system take-over, not just the website, the entire system). So, whatever process created that was running as root, and that is the “root problem” (no pun intended) to look at – how it is you’ve got a WordPress process running as root. Perhaps you ran WP-CLI as root? Or you have WP-Cron running under root?

    Hello @bornforphp we are experiencing the same issue. The wpo-cache folder ownership keeps switching to root, even though our nginx and php environment are owned by another user. This affects ability for WP-Optimize to cache and whenever we fix file permissions to switch back to right owner, it usually resets to root after a few days. Web host says this is outside their scope and must be an issue with Wp-Optimize

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘The owner of the generated cache file is created as root’ is closed to new replies.