WordPress.org

Ready to get started?Download WordPress

Forums

Unable to add or update themes/plugins, WP 2.9.2 on Mac OS X Server (21 posts)

  1. dbodonnell
    Member
    Posted 4 years ago #

    My setup: WordPress 2.9.2 running on Mac OS X Server 10.5.8. The setup has been stable for months, but a couple of weeks ago something changed and now I cannot update plugins, themes, or pretty much anything else—though I can upload photos and media and make posts.

    Here’s an example from when I just tried to update Suffusion:

    Downloading update from http://wordpress.org/extend/themes/download/suffusion.3.4.6.zip.
    Unpacking the update.
    Installing the latest version.
    Enabling Maintenance mode.
    Removing the old version of the theme.
    Could not create directory. /Users/atropos/Web/Fates.org/moc/wp-content/themes/suffusion/
    Theme upgrade Failed.

    ~atropos/Web is a symlink to the drive where my Web sites and WP installation are kept. I’ve verified that it’s possible to traverse the link over the command line and FTP. I’ve verified that I *can* create the suffusion directory manually over FTP. I’ve even opened the permissions to 777 all the way up to the root of WordPress.

    I’m at a loss for what’s going on. Has anyone else seen this? Am I missing something that should be plainly obvious to me? I know it’s not just theme-related, as I cannot update any plugins either.

    Any help, suggestions, etc. would be greatly appreciated!

  2. leggo-my-eggo
    Member
    Posted 4 years ago #

    I'm having this exact problem on Mac OS X Server 10.6.3. And it began a couple of weeks ago.

  3. dbodonnell
    Member
    Posted 4 years ago #

    Are we the only WordPress people running it on Mac OS X Server?

  4. bgeraci
    Member
    Posted 3 years ago #

    Well, for what I'm worth (not much in this area) I, too, am a Mac Server admin.

    http://wordpress.org/support/topic/395782?replies=1

    Unfortunately, I have *no* answers of any kind!

  5. dbodonnell
    Member
    Posted 3 years ago #

    I’ve tried to make sense of the actual PHP code that comprises WP, but it’s way beyond my skills. The only thing I can think of is that maybe Apple made some bizarre change to FTP with a recent Software Update that makes it impossible to do what was working before.

    If WP supported SFTP, this would likely be a non-issue, but I have no idea if it’s even on the developers’ radar.

  6. mmidyette
    Member
    Posted 3 years ago #

    Hey Guys I'm a new to WP. I am having problems getting the software to install. I am a Mac user and It looks as if it downloaded in my download folder but then there are so many files associated that I'm totally confused on how to install... help

  7. dbodonnell
    Member
    Posted 3 years ago #

    @mmidyette, Check out their five-minute install. If you’re installing WP on a current version of Mac OS X, it should work flawlessly.

  8. dbodonnell
    Member
    Posted 3 years ago #

    FWIW, I had to manually upgrade WP to WP 3.0. After doing so, I am still unable to automatically update anything. WP consistently fails trying to replace the existing files, even though I can manually replicate the steps (as far as I know) using plain old FTP.

  9. coreyb
    Member
    Posted 3 years ago #

    Well, I am having the exact same issue. I switched our server environment to Mac about 6 months ago and have been having this problem since. Before I was on CentOS and it seems like it may have been happening on that OS as well, but I cannot remember for sure...

    Here is an example of the standard error message for indexing and tag purposes. ;)

    Downloading install package from http://wordpress.org/extend/themes/download/some-theme.zip…
    Unpacking the package…
    Installing the theme…
    Could not create directory. /Path-to-blog/wp-content/themes/some-theme/
    Theme install failed.

    It also happens on plugin updates and installs, but strangely not the full WP version updates.

    Anyway, I have checked the following with no luck. I am running PHP 5.3.1 on Mac OSX 10.6.3 Server. Yes, safe mode is OFF and permissions are set right (I have tried 775 and 777 on everything inside and including the wp-content directory.) The ownership should be correct set to root:_www, but just for kicks and giggles, I tried it with [username]:_www. The directories do have extended attributes (which is standard on Mac OSX Server since 10.5)

    The full apache path I am using is:
    /Library/Webserver/vhosts/blogname/wp-content
    phpinfo() indicates that the full server path, according to apache, is
    /Library/Webserver/Documents
    The ftp path is:
    /blogname/wp-content
    However, the FTP path is what WP is using to direct any uploads.

    Images seem to be uploading just fine, and even the temp files are showing up in the upgrade directory the way they should. Also, the system is removing the files it requires removed when doing an update, but the problem seems to lie in moving and/or creating a directory from within the WP admin. I believe the problem is the "mv" function (wherever that is in the code) that WP uses to place the files created in the /wp-content/upgrade/somefile.tmp/somefile directory to their final location, not the mkdir function that is being focused on throughout the Internet.

    Anyway, I am hoping that someone smarter than I can weigh in on this. I am happy to experiment to figure it out and report, just let me know.

  10. sacredpath
    Member
    Posted 3 years ago #

    This is just a wild guess (based on a lot of linux installs) but this sounds like "owner" and/or folder permissions issue on the servers.

    When setting up a linux install, the first thing I do after the initial install is to ask the host to scan all files and folders in the account and make sure they are all owned by the account holder. If they are not, you can see this issue. You can also see this issue if the permissions are not set correctly on the various files and folders.

  11. coreyb
    Member
    Posted 3 years ago #

    I am certain that this is not an ownership (or even a permissions) problem, as evidenced by the fact that blog admins are able to upload images to the other directories within wp-content (using WP admin) as well as auto-upgrade the installation of WP with the exact same system set ownership/permissions without trouble.

  12. sacredpath
    Member
    Posted 3 years ago #

    I've seen instances where people can upload images from within wordpress with no problems, but they cannot upload/update plugins and/or themes and/or wordpress core.

    I've seen instances where people cannot upload images from with wordpress, but they can upload/update plugins and/or themes and/or wordpress core.

    In each instance, it has been either an ownership or permissions issue.

    Plugins go into the wp-content/plugins. Themes go into the wp-content/themes. WordPress core goes into either its own subdirectory, or directly into /public_html. Images go into wp-content/uploads.

  13. sacredpath
    Member
    Posted 3 years ago #

    All I'm suggesting is that you should check ownership and permissions for the folders where you are getting the error.

    just sayin'

  14. coreyb
    Member
    Posted 3 years ago #

    Thanks for the advice sacredpath. :) I have rechecked all the permissions and everything seems to be set and working correctly.

    I did add an error check on the system, and contrary to my thoughts, it seems the hiccup is happening at or close to the mkdir function. :(

    I am having a hard time tracing it past line 238 in wp-admin/includes/class-wp-upgrader.php. It may also be failing at the point of transfer, because the ownership mkdir is using may be different than the FTP user that was used to fetch the files...

  15. dbodonnell
    Member
    Posted 3 years ago #

    I had hoped that modifying the share point using Server Admin to share the directory over FTP might do the trick, but no such luck. I consistently get an error:

    Could not create directory. /Web/Fates.org/moc/wp-content/plugins/flickpress/

    (this example is when trying to reinstall flickpress after an upgrade attempt blew the old version away).

    If I manually FTP into the machine, I can create directories and files without trouble.

    I’m certain it is not a permissions or ownership problem, either. I’ve gone so far as to chmod 777 directories and chown _www, myself, and every other user I could think of.

  16. chargertech
    Member
    Posted 3 years ago #

    Same problem on my end. I have an Xserve setup as a Webserver for my class page, school newspaper page, and student sites. I am running OS 10.5.8 and WP 3.01. Every time i try to install an update, new plugin, etc. I get the dreaded Could not create directory. /xxxxx

    Any solutions, yet? It is really bugging me.

  17. chargertech
    Member
    Posted 3 years ago #

    bump

  18. Andy Fragen
    Member
    Posted 3 years ago #

    I think I've found a partial solution. At least it works for me on OS X Server 10.5.8 and then even after upgrading to 10.6.4. Also, now on WP 3.0.1.

    Full details at http://thefragens.com/blog/2010/06/wordpress-automatic-updates/

    Essentially, changing permissions and owner for specific files and folders. It still doesn't run as expected as the page graphic never advances but a check of plugins or themes does show them as updated. Unfortunately this doesn't seem to work for updating WP itself.

  19. dbodonnell
    Member
    Posted 3 years ago #

    @afragen, thanks for the link! It turned out that for me, all I needed to do was add
    define(‘FS_METHOD’,’direct’); in my wp-config.php and I was able to install a new plugin without problem. It remains to be seen whether it will affect upgrades and new WP installs, though… One can hope!

  20. epor
    Member
    Posted 3 years ago #

    This problem of being unable to install plugins and update the wordpress core automatically has been bothering me for a while now. Inspired by the upgrade to 3.0.5, this thread, a bunch of other webpages that were mostly unhelpful, I think I have finally found a setup that works for me.

    Adding define(‘FS_METHOD’,’direct’); to wp-config.php seems to be a critical first step to get both to work. This alone seems to get plugin installs working correctly, but not the core updates.

    The only way I have been able to get the core updates to work is to change the group ownership of all of the files in the wordpress directory to the OS X webserver group, which is _www. This can be done with the terminal command replacing YourUserName with your user name currently assigned to the files:
    sudo chown -R YourUserName:_www *

    Then, read, write, and execute permission for all of the files and folders need to be given to the webserver via the file group permission. This can be done with the terminal command:
    sudo chmod -R 775 *

    This makes sense as the webserver is installing the updates, and needs to have permission to replace files.

    I have read that other servers are setup that your own personal webserver process is actually considered a user of your files as well, so these extra steps and permissions are not necessary. This just isn't true for OS X, so we need some extra configuration.

    Hope this helps.

  21. Andy Fragen
    Member
    Posted 3 years ago #

    @epor, you've found the missing link for me. Thanks a million.

    BTW, my blog post above has a bad link.
    http://thefragens.com/blog/2010/06/wordpress-automatic-updates/

Topic Closed

This topic has been closed to new replies.

About this Topic