Updated to 1.7 and permission denied to run once the config.php

Updated to 1.7 and permission denied to run once the config.php

von Tito V -
Anzahl Antworten: 3
After backing up my database I updated to v1.7 following these steps:

Make Backup of current moodle installation
>cd /usr/share/
>mv moodle moodle.backup
-----------------------------
Copy moodle from ftp to right directory
>cd /home/ftp/
>mv moodle-latest /usr/share/moodle
----------------------------------------
Copy config.php from backup
>cd /usr/share/
>cp moodle.backup/config.php moodle
--------------------------------------
Setup by visiting admin page
http://xxx.x.x.xxx/moodle/admin
----------------------------------------
And I get the following message:

Warning: require_once(config.php) [function.require-once]: failed to open stream: Permission denied in /usr/share/moodle/index.php on line 39

Fatal error: require_once() [function.require]: Failed opening required 'config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /usr/share/moodle/index.php on line 39


hmmm?
I checked and everything is where it is supposed to be.
I tried repeating with a new download of v1.7 with the same results.

I'm sure its because i'm a noob at Linux and there's some really simple permission issue... but I cannot think of it. Can you help me figure it out?

Thanks!


Als Antwort auf Tito V

Re: Updated to 1.7 and permission denied to run once the config.php

von Martin Dougiamas -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Moodle HQ Nutzerbild von Particularly helpful Moodlers Nutzerbild von Plugin developers Nutzerbild von Testers
Make sure all the moodle files are readable to all:

cd /usr/share
chmod -R ugo+r moodle

(Change mode recursively so that user, group and others have read access, for the moodle directory)
Als Antwort auf Martin Dougiamas

Re: Updated to 1.7 and permission denied to run once the config.php

von Iñaki Arenaza -
Nutzerbild von Core developers Nutzerbild von Documentation writers Nutzerbild von Peer reviewers Nutzerbild von Plugin developers

Humm, that's just half of the work lächelnd. You need to grant 'execute' permissions on the directories, otherwise you won't be able to get 'inside' them. Something along these lines would do the trick:

cd /usr/share
find . -type d -exec chmod ugo+rx {} \;
find . -type f -exec chmod ugo+r {} \;

Saludos. Iñaki.

Als Antwort auf Iñaki Arenaza

Re: Updated to 1.7 and permission denied to run once the config.php

von Tito V -
Thank you to both of you for your rapid response.

I did all the above and had success in reopening our moodle site. Thank you so much!

Tito