• Peter

    (@peterhemmings)


    Hi,
    I am running Fedora 23 with mariaDb, hppd and phymy admin.
    LAMP seemed to be OK and I can open wp-admin get and modify sample themes but not import any as I have the message that its unable to create a directory but it does extract it.
    I have read some articles on permissions of the theme directory which I don’t think is safe but tested it with changed permissions – still the same results.
    I assume my configuration of httpd or something else is wrong as I cannot update widgets as well!
    I also manually downloaded a zip of a theme, extracted it and put it in the theme directory but still I cannot see it.
    Any help appreciated as I want to be able to use my laptop as a demonstrator to my local club.

    Thanks

    Peter H

Viewing 4 replies - 1 through 4 (of 4 total)
  • The user which runs the httpd daemon should have the permission to access and create file and directory in your WordPress installation.

    if it’s just for a demo on your local laptop you can do this quickly by giving everybody the right to write on you WordPress directory and subdirectory. But it’s totally unsecure.

    $ sudo chmod 777 -R <your_wordpress_directory>

    a best solution is to add the user who runs the httpd daemon in the group who owned the wordpress directory and subdirectory and then give right to write only to the group who owned the wordpress directory

    for example: the user USER1 and group GROUP1 own the wordpress directory. the HTTPD user runs the httpd daemon

    then add the HTTPD user to your GROUP1 group

    $ sudo usermod -a -G GROUP1 HTTPD

    then give write permission to GROUP1 for the whole WordPress directory and subdirectory

    $ sudo chmod -R 770 <your_wordpress_directory>

    if you want more security, you chould check the suexec or suphp or mod_apache_itk and there is lot more.

    Dion

    (@diondesigns)

    Since this is a localhost install, the best solution is to edit the Apache configuration file (httpd.comf) to change the ownership of spawned Apache processes.

    Find the Apache httpd.conf file — it could be in the /etc, /etc/httpd, or /usr/local/apache/conf directory. Open the file in an editor, and locate the two lines which are of the form User= and Group=. Most likely their values will be either “nobody” or “www-data”. Change the values on both entries to the name of your Fedora user, then save the file and restart Apache. Your problem will be fixed without the need to mess with file permissions.

    This solution only applies to systems where a single user is accessing Apache. If multiple users are accessing Apache, you’ll need a FastCGI handler for PHP such as PHP-FPM.

    Had the same problem with a move today and it bugged the hell out of me – this fixed it for me…

    You can manually update/change the “uploads” folder instead of defaults:

    1. Sign in your WordPress admin Panel.
    2. Go to Media Settings menu (Settings =>> Media).
    3. Find the “Store uploads in this folder” text box and either remove the specified path, leave it blank, for WordPress to use the default path of wp-content/uploads – OR – put in the path to your uploads folder .
    4. Click on the “Save Changes” button to save the changes and you are done.

    Had the same problem with a move today and it bugged the hell out of me – this fixed it for me…

    You can manually update/change the “uploads” folder instead of defaults:

    1. Sign in your WordPress admin Panel.
    2. Go to Media Settings menu (Settings =>> Media).
    3. Find the “Store uploads in this folder” text box and either remove the specified path, leave it blank, for WordPress to use the default path of wp-content/uploads – OR – put in the path to your uploads folder .
    4. Click on the “Save Changes” button to save the changes and you are done.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Local Install – Unable to create directory’ is closed to new replies.