The MU forums have moved to WordPress.org

Automatic upgrade: in which folder does unpacking occur? (11 posts)

  1. donnacha
    Member
    Posted 15 years ago #

    Can anyone tell me what folders are involving in the automatic core upgrade?

    I was having problems getting automatic plugin upgrades working but managed to get it working by chmod'ing the plugins and upgrade folders to 777.

    Now I am trying to upgrade MU itself from 2.7 to 2.8.4a but the process gives me this error:

    Downloading update from http://mu.wordpress.org/wordpress-mu-2.8.4a.zip
    
    Unpacking the core update
    
    Could not copy files
    
    Installation Failed

    ... so, it is pretty clear that Apache, as a user, does not have permission to copy from wherever the unpacking is taking place, all I need is to find out what folder that is and 777 it.

    Apologies if this is a newb question, I would very much appreciate any advice you can give.

  2. andrea_r
    Moderator
    Posted 15 years ago #

    It's more that it can't copy *to* the folder where MU is.

    If you're 777 folders, make sure you put them back when the upgrade is done.

  3. donnacha
    Member
    Posted 15 years ago #

    Andrea, thanks very much for responding.

    What would be the best chmod level to put them back to?

    And, when you say that it can't copy *to* the folder where MU is, do you mean that it has sufficient privileges to able to read the update files from whatever temporary location they have been unpacked to but is simply not able to then write them into wp-content or whatever? Should I (temporarily) chmod -R 777 the entire wp-content folder?

  4. andrea_r
    Moderator
    Posted 15 years ago #

    It has to replace files in the root of the mu install as well, not just the wp-content folder.

    really, if you have to mess aroudn resetting folder permissions and everything, you might as well do it manually. Which is as simple as uploading the new files over the old.

  5. SteveAtty
    Member
    Posted 15 years ago #

    And from a security stand point its a lot more secure doing it that way if you've got your upload user set up properly

  6. donnacha
    Member
    Posted 15 years ago #

    Okay, thanks Andrea and Steve, I will do it the old-fashioned way for now and, hopefully, at some point in the future, I will figure out how to attribute the ownership of the files to my user account rather than Apache, so that I can get automatic upgrades working.

    I have to admit that, after the frustration I've had trying to get it working in the past, I foolishly stop bothering to upgrade, pretty dumb of of me but, luckily, I didn't get hacked, I wouldn't be so foolish in the future.

    Just out of interest, would it be bad practice to simply add the user for that account to the wheel group, would that give root-like permissions to it? That might solve the problem of not being allowed to copy, without having to change the actual file permissions. One-click upgrades would certainly be handy for plugins.

  7. SteveAtty
    Member
    Posted 15 years ago #

    What I did was set the primary group of the user I upload to as www-data (which is the primary group of the apache process) and set the mask so I create files/directories with read only access on the group.

    So its only the blogs.dir and the cache directories which I had to set when I first set the site up.

    Running on linux as a desk top I simply make an SSH file share to the server and drag and drop and tell it to merge/overwrite.

  8. amanzi
    Member
    Posted 15 years ago #

    Can anyone tell me if the automatic upgrade overwrites all files, or only the ones that have been modified since the last release?

  9. andrea_r
    Moderator
    Posted 15 years ago #

    All of 'em. So if you change any cores files, they get overwritten.

  10. tdjcbe
    Member
    Posted 15 years ago #

    Which is why we use SVN. :)

  11. amanzi
    Member
    Posted 15 years ago #

    Thanks. I've only played with SVN with test sites. So you guys use SVN to check out from trunk and it only downloads the files that have been changed since the last release?

About this Topic