WordPress.org

Forums

Unable to create directory wp-content/uploads. Is its parent directory w (4 posts)

  1. rtklwm
    Member
    Posted 2 years ago #

    Hello,

    A friend at work threw a Linux box together and we installed WP 3.4.2 on it. Everything looks OK so far, but I cannot install plugins.

    1. I cannot install plugins via "Install Now" because we're not connected to the outside world. I reach my installation over our network. My fault there.

    2. I cannot install plugins by dropping the folder of files (/contact-form-7), for example, in the plugins folder under /wp-content.

    3. I cannot install plugins via Uploading a .zip. I get the error:
    Unable to create directory var/www/wp-content/uploads. Is its parent directory writable by the server?

    Now, I've seen a lot of people solve this problem by fiddling with the permissions of wp-content and/or changing the Settings > Media > "Store uploads in this folder" path to plain-old wp-content/uploads like the default says.

    I've tried all of that. The weird thing was that I didn't have an /uploads folder to begin with ... Was I supposed to after setup?

    My installation lives at a 10.120.20.69 type address with everything under var/www/.

    The guy who put the Linux box knows less than me about WordPress and I know less them him about Linux boxes. If we're missing anything obvious, please help if you can.

    Thank you!

  2. Abhishek Ghosh
    Member
    Posted 2 years ago #

    My installation lives at a 10.120.20.69 type address with everything under var/www/

    You do not have a static IP (possibly). I can not open it. Use
    http://localhost/ or http://127.0.0.1/ instead.

    Unable to create directory var/www/wp-content/uploads. Is its parent directory writable by the server?

    Seems you are using Debian or Ubuntu. CHMOD the wp-content to 777 recursively.

    The guy who put the Linux box knows less than me about WordPress and I know less them him about Linux boxes. If we're missing anything obvious, please help if you can.

    You can ask at Ubuntu forum. They are very helpful. Plus you can search with "installing WordPress on Ubuntu localhost" on Google for videos, tips etc.

    Its actually more about Server than WordPress.

  3. rtklwm
    Member
    Posted 2 years ago #

    Thank you, Abhishek. We are using Ubuntu.

    What little I know of permissions tells me that to recursively CHMOD a directory like this to 777 is an unsafe idea, even if it's a dev server living behind our firewall. Eventually it will go live and I probably will have forgotten that I did this by then.

    Anyhow, I did it ... and WordPress created /uploads and moved the zip to the file on command. However, it did not run the next step of unzipping. Instead of the original "unable to create directory" error page I got when "uploading" a zip, I now get the "FTP creds required" page: /wp-admin/update.php?action=upload-plugin

    So, thank you -- that gave me more info. I guess I will look to the Ubuntu forum, per your suggestion ... but I feel like I'm missing knowledge of how WordPress handles plugins.

    And now I CHMOD wp-contents back to 755. (had to sudo this...) Hope that's sufficient.
    http://codex.wordpress.org/Changing_File_Permissions

  4. Abhishek Ghosh
    Member
    Posted 2 years ago #

    What little I know of permissions tells me that to recursively CHMOD a directory like this to 777 is an unsafe idea

    Yes. It was definitely for test for (usually) with no PHP file containing folder. But it does have risk.

    However, it did not run the next step of unzipping. Instead of the original "unable to create directory" error page I got when "uploading" a zip, I now get the "FTP creds required" page: /wp-admin/update.php?action=upload-plugin

    So the unzipping is basically not working. Because "FTP creds required". It is quite common error. You can try few tricks (there is probably no absolute universally working trick). Use one by one. Use one, reverse if does not work, move to next :

    1. If you are using mod_php, switch to mod_suphp.
    2. In wp-config.php file, you will find :

    if ( !defined('ABSPATH') )
       define('ABSPATH', dirname(__FILE__) . '/');

    Replace with :

    define('FS_METHOD', 'direct');

    (This will Prevent FTP to ask for credentials).

Topic Closed

This topic has been closed to new replies.

About this Topic