Home > Dokkeos, English, security, Techie > Chamilo, new course, error about group permissions

Chamilo, new course, error about group permissions

There is a common problem appearing when installing a new Chamilo portal that I have seen a lot recently, so I thought I’d share the details here.

The problem

When installing Chamilo on a cPanel-kind-of-hosting, it might happen that you complete the installation, but when you want to enter a newly-created course, an ugly error appears. Something of the likes of:

Internal Server Error

or, if you are lucky

/…/courses/COURSECODE/index.php cannot be displayed because it is writable by the group.

Either way, those two error message precisely when the URL of your browser shows http://your-domain-name/courses/YOURCOURSECODE/index.php mean that you have a “secured” version of Linux.

This implies that for any PHP script that you want to execute, this message will appear if the script is writable by any other user than the owner of the file.

In a cPanel system, you will see that this file (and possibly the directory it’s in) have write permissions for the group.

The permissions syntax

I’m reviewing basic stuff here, so if you know about UNIX permissions or just don’t want to know, just skip to the next section.

This is represented by the permissions indicator


which can be translated as: the owner can read, write and execute this script, the owner *group* can read, write and execute this script, and all other users can read the script, but not write or execute it.

The write permission gives you the right to edit the file, but you need a write permission on the containing *folder* to actually create or remove this file.

Anyway, so the risk is that, by letting too many people access this script, it could be used (and modified) by a cracker (an evil hacker) to execute his code instead of yours on your server.

Fixing the problem now on the server

Now the quick fix is to read carefully the error message and change the permissions accordingly. The server tells us that this script cannot be opened because it is writable by the group. So all we need to do is remove the write permission on this file. Just click on whatever option allows you to change the permissions on that cPanel and remove the write permission for the group.

This should result in your file’s new permissions to look like this:


If the server bothers you with write permissions about the directory, you need to set the directory’s permissions to

– rwxr-xr-x

Execution permissions are needed to read inside this directory (and get to index.php).

This should solve your problem for this course. Now you want to avoid doing that for all courses to come, don’t you? Read on…

Fixing the problem for the future from inside Chamilo

Since Dokeos 1.8.4 (or a little before that), we added a few settings inside the database that lets you mention what type of permissions you want new files and directories to use. Well, this is precisely one case for which we did that.

You want to head towards your “Portal Administration” tab, “Platform” section, “Configuration settings” link, then “Security”, then the “Permissions for new directories” and “Permissions for new files” settings. By default, these are set to 0777 and 0666. Considering you want the groups not to have write permissions, and considering 0777 is representing rwxrwxrwx and 0666 is representing rw-rw-rw-, you just want to change these to 0555 and 0444 respectively.

That’s it, you can now create a new course without having to worry about files permissions!

  1. September 20, 2008 at 1:59 am

    Thanks for your solution, it worked, as I had the same problem, I´m working with Dokeos V 1.6.5, and doesn´t have the security option than allow to set the kind of permissions desired for files, but by mean of the CPANEL I did it.

  2. October 7, 2008 at 3:51 pm

    thanks, it solved my problem

  3. Jesus Mendez
    July 20, 2009 at 10:19 pm

    We really appreciate your help. Thank you very much.

  4. Wfirefox
    October 23, 2009 at 7:41 am

    i’m sory but this no functionning…
    I have always :
    You don’t have permission to access /courses/BOB/ on this server.


    Apache/2.2.3 (Red Hat) Server at mysite Port 80

    • ywarnier
      October 23, 2009 at 9:53 am

      Hi Wfirefox,

      I’m probably even more sorry. I’m trying the best I can to help you all but there are loads of hidden reasons why this could not work, depending on your specific configuration. This being said, there are about 7000 reported installations of Dokeos which work, so I can’t imagine we’re doing it completely wrong.
      Please consider having a professional look up at your server configuration and give you a hand.

  5. Pedro
    January 26, 2010 at 4:01 pm

    Hi !

    Thanks for your post.

    I had that 500 error problem, and when I changed that, it was ok.

    But now I have the folloing message:
    “Not Found
    The requested URL /courses/PESD/index.php was not found on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”

    Can you help me now ?

    • ywarnier
      January 26, 2010 at 4:46 pm

      Hi Pedro,
      Maybe that comes from the first time you created the course and the error happened. Does it happen when you create a *new* course now? If not, then you have fixed the problem and should just remove the PESD course from the courses list in the admin section.

      • February 7, 2016 at 10:56 pm

        Hi, ywarnier!
        I have the same issue. I try to create a new course. And if i press on name coure or “Course home” button i have the message:
        “The requested URL /chamilo/courses/TEST/index.php was not found on this server.”
        Yes, i don’t have this folder courses/ on my server and if i create i’ll have the same error.
        I found https://support.chamilo.org/issues/7918, but i can’t understand what i need to do.
        Apache/2.4.7 (Ubuntu)
        Ubuntu 14.04
        chamilo v1.10.2
        Please help me.

      • Yannick Warnier
        February 8, 2016 at 6:21 am

        This is another error, but it is probably only because you’re using a host name that is not recognized by the server itself. The server (being the one issuing the test) should be able to translate the hostname that you’re giving it.
        If you install using http://www.abcd.com or an IP address and this IP address or domain name is not translated by the server to itself, then it won’t work.
        An easy fix to this (if you’re not using an IP) is to add the hostname to the /etc/hosts file of your server on the “” line, after “localhost”.

  6. Pedro
    January 26, 2010 at 4:51 pm

    Hi !

    I’ve just tryed to create a new course, and the problem presists…. :-(

    Any hints ?

    Thnaks !

  7. Pedro
    January 26, 2010 at 4:53 pm


    The error is slightly different….

    It just says:

    “Index of /courses/TESTE05

    Parent Directory”

    It’s not an error… but it did not create any new index.php file in thge new directory…

    Any hint ?

    Thnaks !


  8. ywarnier
    January 26, 2010 at 5:12 pm

    Seems to me that it is possible to create the directory but not the file… Try to manually create an index.php file in there that contains this:

    $cidReq = “TESTE05”;
    $dbname = “TESTE05”;

    And then try to enter the course again. It is very likely that the permissions on the courses/ directory were first wrong and then you changed that, but in the meantime you changed the permissions in the security settings of Dokeos/Chamilo to something else than 0777 and now you can create the directory but you cannot create anything inside it :-)

  9. Pedro
    January 26, 2010 at 5:25 pm


    What should it be in the .phgp file ?

    Thanks a million !

    • ywarnier
      January 26, 2010 at 5:51 pm

      Sorry about that, my code had been commented out :-)

  10. Cedric Gerard
    April 5, 2011 at 6:20 pm

    changing “Permissions for new directories” to 0755 worked for me, 0555 did not, I guess it really depends on the hosting provider…

  11. November 12, 2011 at 10:30 am

    hi to you, all Chamilo fans,

    I had a similar problem, but solved it in another way. after reading your post, I tried to change, by trial and error, the file and directories permissions, with many combinations, with no success.
    but first a little info: Chamilo installed on Bluehost with SimpleScrips, on a directory of lucadezmir.com (initial address: lucadezmir.com/cursuri).
    on lucadezmir.com is a WordPress instalation. when I tried to open a new course (after making it), it gave me 404 error FROM THE WORDPRESS instalation.
    the fix: made another subdomain: cursuri.lucadezmir.com, installed Chamilo, made a course, tried to open it, got a 500 type error but, interesting, at the end of the error was a nice word: “FIXED.” reloaded the page and…bang…I had access to the course.
    I tried to fix the problem for two days, got help from a friend. kudos for the fix goes to Razvan
    now I am going to start the long and nice process of building the campus :)

    all best to you,

    • Yannick Warnier
      November 12, 2011 at 4:44 pm

      Great Luca,

      Would you mind sharing Razvan’s solution with us so others can benefit?

  12. December 8, 2011 at 3:10 am

    Thank you very much, but for my system I need have to set 0755 and 0644 to dir and files respectively and it works for me, but… when I delete any Course from admin, the permissions return to the original configuration :(

    • Yannick Warnier
      December 12, 2011 at 1:12 am

      Hi Luis,

      I just tried that and I cannot repeat the issue. Please make sure you report it on http://support.chamilo.org with plenty of details so we can reproduce it and fix it.

  13. April 18, 2013 at 3:08 pm

    Fixing the problem for the future from inside Chamilo,
    this was it, works great now, thanks alot

  14. January 19, 2014 at 6:30 am

    Hi, Just installed chamillo 1.9.6 and am getting the same errors. Tried changing the permissions nothing is going through. Who can assist please

  15. Femi Taiwo
    July 20, 2015 at 12:56 am

    @Cedric Gerard Thanks for the post 0755 worked for me too on Hostgator,Thanks

  16. Yusnier
    December 26, 2015 at 9:57 am

    Hi there,

    my error is Not Found
    The requested URL /courses/OTROCURSO/index.php was not found on this server.

    I have tried with many combinations of permissions and with the test index.php you privided:

    Never changed, I dont know I the index.php is correct for me.

    I have my installation in ubuntu 14.04, no hosting,

    I have noticed that when I create a new course, index.php is not created.

    Thanks in advance for your help.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: