• (I realize this might be a bit long, but I am trying to understand what is going on. )

    I am migrating an existing WP 5.8.12 installing on Fedora to a new server with WP 6.9. I used the WP Close plugin to create a backup. When trying to restore the backup on the traget system, I kept getting permissions errors, but basically nothing more that that. No information was displayed about what file or directory.

    All of the files and have ownership wwwrun:wwwrun. andas far as I can see permissions on files are rw(664) and for directory rwx(775). Since httpd is running as wwrun, I figure that would be sufficient. Apparently not. I was able to track down a logfile (I forgot which one) which pointed me to a directoy where a discovered that the apache user was having the problems. This was the first time I heard anything about the apache user needing access. Years ago that was the user httpd ran on as it was the Apache package (later Apache2). Changing the group on all of the WP files and directories to apache I was able to restore the backup.

    From what I have able to see, it seems that php-fpm uses apache. However, ps shows that php-fpm is running as wwwrun. Looking at /etc/php-fpm.d/www.conf, I see the line “group = apache”. So, I think that at least some of the files and directories need the group to be apache, which seems to be confirmed by it working when ichanged the group to apache.

    I understand everything at the OS level and know what to do in principle to make it work, but changing the persmission on all of the WP file seems to me to be overkill. Wo the question is what should the permission be, as the default don’t seem to work?

    Thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Moderator threadi

    (@threadi)

    WP Close plugin

    Which one? I can’t find anything under that name. But that doesn’t really matter for your question, because you need to set the file and directory permissions correctly in your hosting. What is “correct” here depends on the hosting and is neither influenced nor set by WordPress. See this article for more information: https://developer.ww.wp.xz.cn/advanced-administration/server/file-permissions/

    Tip: ask in a Fedora community forum how to set the permissions so that they are appropriate. Appropriate means that the software used (and it doesn’t even have to be WordPress) is allowed to both read and write.

    Thread Starter jamesmohr

    (@jamesmohr)

    Thanks for the reply.

    Sorry, Typo. WP Clone by WP Academy.

    Thanks for the link, I read through it and came across this:
    “Additional directories under /wp-content/ should be documented by whatever plugin / theme requires them. Permissions will vary.”

    So, if the plugin documentation doesn’t mentioned anything, you’re on your own.




    Moderator threadi

    (@threadi)

    I don’t know of any plugins that require their own permissions here. They should all adhere to WordPress standards, which require that the permissions for directories and files be set correctly on the hosting side.

    Thread Starter jamesmohr

    (@jamesmohr)

    My only explanation is the the WP Clone plugin uses php-fpm in a different way than other plugins, perhaps requiring it that way because it has to overwrite so much when restoring the backup. At this point my interested is academic as the site is up and running.

    I do appreaciate your response.

    Moderator threadi

    (@threadi)

    PHP plugins cannot influence PHP processes in the way you seem to be assuming. What would be possible is for them to set directory and file permissions themselves. To find out whether this is the case with the plugin you are using, you would need to ask their support team, which you can find here: https://ww.wp.xz.cn/support/plugin/wp-clone-by-wp-academy/

    Thread Starter jamesmohr

    (@jamesmohr)

    Then were did the files with apache user permissions come from that were not there before I started the restore and why did the restore only work when the apache user could write to specific directories? I’ll ask in that forum. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.