lost permissions during upgrade

lost permissions during upgrade

by Pamela Giles -
Number of replies: 3
Disaster--while upgrading my 1.5dev site just now, I seem to have locked myself out of the site.  sad

I am using a hosted server (Apache, I think) without shell access; I ftp through Dreamweaver and extract/delete etc. through cpanel.

My usual backup procedure is as follows:
1. Backup courses manually. (No backup available today as backup quit working after Saturday's upgrade, which is the main reason I was trying the latest version tonight.)
2. Delete entire moodle directory on server (not enough server space to leave old installation there while I'm creating the new one). Moodledata and the MySQL database remain untouched.
3. Upload moodle-latest.zip. Extract files.
4. Run the admin panel to upgrade.

This procedure has worked flawlessly so far. Tonight I modified the procedure by first putting the site into Maintenance Mode, which I think is the source of my problem. Now when I extract the files from moodle-latest, the permissions for that entire directory are set to 0-0-0. I can change them manually, but this seems to be a one-at-a-time process in cpanel, impossible. I therefore can't reinstall Moodle.

In another thread, Martin indicates that maintenance is just a file in dataroot. However, he does not name the file. Would removing this file (what is it called?) enable me to unzip moodle-latest without having permissions all be set to 0?

Any help or suggestions gratefully appreciated.

Pamela Giles
University of Saskatchewan
Average of ratings: -
In reply to Pamela Giles

Re: lost permissions during upgrade

by Pamela Giles -
Update: I managed to change the permissions for the Moodle directory and was then able to reinstall Moodle.

However, I still don't know how to avoid having this catastrophe happen in future upgrades. What procedure should I be following for upgrades, beyond what I've posted above? Is Maintenance Mode a bad idea if I'm not using CVS? Would getting a shell account and being able to use CVS alleviate the whole problem?

Still perplexed,

Pamela
In reply to Pamela Giles

Re: lost permissions during upgrade

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Maintenance mode is really simple ... it wasn't involved in all this.

The file is dataroot/1/maintenance.html. All the presence of it does is prevent access to courses by non-admin people, and the contents of it are shown to them to explain.

The way I plan to use it to simply "touch" the file from the shell prompt before a big upgrade, then update the files from CVS, then do the Moodle upgrade, then turn MM off from the menu.

As to what the actual problem you had was I don't know. Something about the unzip on that server wasn't right.
In reply to Martin Dougiamas

Re: lost permissions during upgrade

by Pamela Giles -
Thanks, Martin, for this helpful information.

Let me get this straight: so I should be able to activate maintenance mode, delete the entire /moodle/ directory, unzip moodle-latest onto the server, and then go into www.mysite.com/moodle/admin and all will progress correctly? That would be great, if so.

Sorry for blaming maintenance mode. It was the only thing I'd done differently from the other 20 or so times I've upgraded using this procedure. (I tried five times last night, so I don't think the problem could be unzipping.)