• Resolved gregscott

    (@gregscott)


    I have two websites; one fully developed running WordPress 4.2.2 on a Fedora 21 server, the other brand new running WordPress 4.3.1 running on Fedora 23 with nothing on it yet. The 4.2.2 site works as expected. The config files – /etc/httpd/conf.d/mysite.conf, /etc/wordpress/wp-config.php are identical other than IP Addresses and website names. And, of course the key info in wp-config.php. File permissions and ownership are also identical across the whole /usr/share/wordpress tree.

    On my 4.2.2 system, in the dashboard when I go to Plugins, I see an “Add new” field and I can add plugins all day long from the dashboard. Same with themes – appearance…themes shows me an “Add new” button.

    I see no “Add new” buttons for either plugins or themes in the new 4.3.1 system. I can navigate to https://www.mysite.com/wp-admin/plugin-install.php via a help link. But it fails with “You do not have sufficient permissions to access this page.” and generates a 403 error in /etc/httpd/logs/access_log. Same when trying the theme-install.php page.

    The new 4.3.1 system is a fresh install. There are no plugins yet outside the basic installation and no themes other than the defaults. The active theme is twentyfifteen.

    Ownership for everything in /usr/share/wordpress is root root. File permissions are 674 across the board. On both systems, I have ACLs that look like this:

    [root@www2016 share]# pwd
    /usr/share
    [root@www2016 share]# getfacl wordpress
    # file: wordpress
    # owner: root
    # group: root
    user::rwx
    user:gregs:rwx
    user:wpupdate:rwx
    group::r-x
    mask::rwx
    other::r-x
    default:user::rwx
    default:user:gregs:rwx
    default:user:wpupdate:rwx
    default:group::r-x
    default:mask::rwx
    default:other::r-x

    What am I missing? Why is my brand new 4.3.1 installation missing those “Add new” buttons and generating 403 errors on the new plugin and new theme pages?

    thanks

    – Greg Scott

Viewing 1 replies (of 1 total)
  • Thread Starter gregscott

    (@gregscott)

    Found the problem. It was a typo in /etc/wordpress/wp-config.php.

    /* Disable all file change, as RPM base installation are read-only */
    /* define(‘DISALLOW_FILE_MODS’, true); */
    define(‘DISALLOW_FILE_MODS’, true);

    Should have been:

    /* Disable all file change, as RPM base installation are read-only */
    /* define(‘DISALLOW_FILE_MODS’, true); */
    define(‘DISALLOW_FILE_MODS’, false);

    I forgot to change “true” to “false” last night. I always keep the original setting commented out as my own audit trail of changes.

    Fedora packages WordPress with “true” because WordPress keeps its content in /usr/share/wordpress but the Linux standard says /usr/share is supposed to be read only. So Fedora sets the config file accordingly out of the box.

    – Greg Scott

Viewing 1 replies (of 1 total)
  • The topic ‘403 error trying to add new themes or plugins from the dashboard’ is closed to new replies.