directory permissions and chmod.php

directory permissions and chmod.php

by Mauricio De la Orta -
Number of replies: 6

Hi Martin,

 First of all, thanks for your great e-learning platform.

I am having troubles with moodle data directories, in the sense that they are being created as "root",  and since I am in a commercial webserver, I cannot modify nor open them.

I checked with my webserver provider, and they told me that I don't have safemode activated so there shouldn't be any problem

Then I read somewhere else that running chmod.php would solve these problems, but when running it from the web, I get some errors like the ones i am attaching at the end of this post.

Is there someting else I can do to solve the problem?

Thank You!

Mauricio

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839

Warning: lstat failed for (null) (errno=13 - Permission denied) in /home/hillsbur/public_html/Ecampus/lib/moodlelib.php on line 839
/home/hillsbur/public_html/Ecampus/data/1

Warning: chmod failed: Permission denied in /home/hillsbur/public_html/Ecampus/chmod.php on line 12
/home/hillsbur/public_html/Ecampus/data/2

Warning: chmod failed: Permission denied in /home/hillsbur/public_html/Ecampus/chmod.php on line 12
/home/hillsbur/public_html/Ecampus/data/4

Average of ratings: -
In reply to Mauricio De la Orta

Re: directory permissions and chmod.php

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
"root"! Something is seriously wrong there with the way that provider has set things up!

You should be able to read and chmod files you have created yourself.
In reply to Martin Dougiamas

Re: directory permissions and chmod.php

by Mauricio De la Orta -

Sorry, my mistake, it didn't mean root but "noone", here is the exact reply that I got from the webserver provider

Safe mode is not on. It is off. You can't modify it because
PHP inherits the user ownership of apache which is nobody.
Then to remove those you need to use the php's web tool to
remove it. That moodle software should have one setup. If
it doesn't then you can't delete it. It was probably built
for dedicated servers in which they assumed you owned the
server and are root.

Thank You

Mauricio

In reply to Mauricio De la Orta

Re: directory permissions and chmod.php

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Do you have shell access to the server ?

How are the owner/group and perms for your moodle_data directory ? (what do you say an "ls -l" command ?

type: chmod 777 path/to/your/moodle/data/dir
(all perms for everybody) and try again ? What happens ?

Ciao.
In reply to Eloy Lafuente (stronk7)

Re: directory permissions and chmod.php

by Mauricio De la Orta -

Hi Eloy,

  I can't change the chmod settings on any directory under the data dir (which is 777), I can't even open any of those directories ... this via FTP because my provider doesn't grant shell access..

 Any ideas?

Thanks,

Mauricio

In reply to Mauricio De la Orta

Re: directory permissions and chmod.php

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Have you received my e-mail questions ?
In reply to Eloy Lafuente (stronk7)

Re: directory permissions and chmod.php

by Mauricio De la Orta -

Hola Eloy,

Thanks for your replies, I accidentaly erased your last email while clearing a big deal of spam in my mailbox, so I logged in here to thank you.

Finally it is working, the problem was that an old version of Moodle had created some directories seemingly with my unix user instead of nobody, but the new version of the software uses "nobody", so there was the conflict.

My solution was to login with telnet.php and create another directory with user "nobody" and redirect everything to that directory (with config.php). Now all directories under that one are being maintained by "nobody"

The only drawback is that now my user cant modify the directories, but that is a minor problem smile

Cheers!

Mauricio