Viewing 11 replies - 1 through 11 (of 11 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    How are you hosting your site?

    What did you change?

    Thread Starter codeforweb

    (@codeforweb)

    Hi Steve,

    I hosting my site on a Red Hat Linux on which I have set up a LAMP stack server. I read in a blog that changing access permission would fix the file upload error and followed the steps provided in links 1 and 2(mentioned in my question).

    I feel the 500 error that I am getting now, is due to the permissions I have set up. I have taken screenshots to show. But can I upload images in this forum or is there another way to show them?

    Thread Starter codeforweb

    (@codeforweb)

    Here is the link for the screenshot of my access permissions that I have set,

    Link1

    Link2

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What is the user under which PHP is running? The file tree in which you’ve installed WordPress must be owned by that user.

    ps -ef |grep php if you’re using php-fpm. Otherwise, the owner should probably be ‘apache’. Also, if you have SELinux activated, you need to ensure that the SELinux permissions are correct, too.

    Permissions should be 755/644.

    Thread Starter codeforweb

    (@codeforweb)

    When I run this command ps -ef |grep php, its says PHP is running under root user. Also I checked(cat /etc/sysconfig/selinux) SE Linux is in enforcing state, but how do I change them to 755/644??

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    SELinux and file permissions are not related.

    This isn’t the place for Linux sysadmin training, but I do recommend that you use php-fpm rather than a straight LAMP stack.

    https://wp-root.org/server/install-php-fpm-tcp-unix-sockets-centos/

    Thread Starter codeforweb

    (@codeforweb)

    I executed this command
    find . type f -exec chmod 644 {} \;
    and the 500 error page is not being displayed now. I am able to view my web page.

    But I am still unable to upload a background image. (same error appears “Unable to create directory wp-content/uploads/2018/05. Is its parent directory writable by the server?”)

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    what is the ownership and permissions of the parent directory?

    Thread Starter codeforweb

    (@codeforweb)

    The directory in which I have my WordPress theme is rr.
    My permissions are

    /var/www – rwxr-xr-x (owner-root)
    /var/www/html – rwxr-xr-x (owner-root)
    /var/www/html/rr – rwxr-xr-x (owner-nobody)
    /var/www/html/rr/wp-content – rwxr-xr-x (owner-nobody)

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    make the it all owner:owner where owner is the same user under which PHP is running.

    Thread Starter codeforweb

    (@codeforweb)

    @sterndata

    Thanks for the help Steve. I am able to upload the images to my WordPress without any issues! :))

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Access Permissions WordPress’ is closed to new replies.