/var/www/clients/client1/web1/tmp/sess_k0dmk4g0ig3bvpa9ceofnsdrb0, O_RDWR) failed: Permission denied

Discussion in 'ISPConfig 3 Priority Support' started by livetv, Jan 31, 2015.

  1. livetv

    livetv Member

    Hello,
    i hade to give permission to moodle, the guide using -
    Code:
    chmod -R +a "www-data allow read,delete,write,append,file_inherit,directory_inherit" /path/to/moodle
    getting - chmod: invalid mode: `+a'
    i googled and find that "+a" used for mac OS
    so tried -
    Code:
    chown -R root:www-data /var/www /var/www/clients/client1/web1/web/moodle
    

    after few second - getting - Operation not permitted
    but now i cant log to moodle site - getting
    and have error in all web site:



    how can i fix or maybe cant?

    Thank you
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats wrong for a ispconfig server, basically this command removed the permissions. The permissions are correct automatically when you upload moodle by ftp into the website, all changes that you make manually then will cause it to fail. To fix the permissions and undo the changes that you made, run this command:

    chown -R web1:client1 /var/www/clients/client1/web1/web
    chmod 755 /var/www/clients/client1/web1/web

    Regarding session error, this happens when the website php mode is switched into a wrong mode, login to ispconfig and ensure that php mode is php-fpm or php-fcgi and that the suexec checkbox is enabled. Then run:

    rm -f /var/www/clients/client1/web1/tmp/sess_*

    to delete all wrongly created sessions.
     
  3. livetv

    livetv Member

    I Performed the 3 command but getting the same results
    ang ispconfig is at php-fmp mod
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the exact error message that you get in the error.log of the website.
     
  5. livetv

    livetv Member

  6. till

    till Super Moderator Staff Member ISPConfig Developer

    The relevant error is most likely this one, so its a different error then the one you had vefore:

    [Sat Jan 31 06:47:58 2015] [error] [client 85.250.188.85] FastCGI: server "/var/www/clients/client1/web1/cgi-bin/php5-fcgi-*-80-my_domain.com" stderr: PHP message: PHP Fatal error: Call to a member function get() on a non-object in /var/www/clients/client1/web1/web/Shop/index.php on line 101

    there is an error in the index.php file, it tries to call a nn existing function. If you are sure that the code of that file is correct, then it might be that not all files of the shop have been uploaded.
     
  7. livetv

    livetv Member

    every thing before this command
    was correct Shop, moodle and ispconfig
    but now after
    i cant log to ispconfig get in browser -
    Internal Server Error
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    in brows of moodle get - Fatal error: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
    in brows of Shop get - Warning: session_start(): open(/var/www/clients/client1/web1/tmp/sess_k9qpdph2rjd992or1te4ijv7t2, O_RDWR) failed: Permission denied (13) in /var/www/clients/client1/web1/web/Shop/system/library/session.php on line 12
     
  8. livetv

    livetv Member

    after spending hours googling and a lot of error i understand that easy way is to reinstall the sever/
    now every thing ok.
    my question is how to allow install moodle plugin from moodle?
    what command premision can replace this command?
    Thank you
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Just dont alter any permissions at all. When you uploaded moodle by ftp, then all permissions are already correct.
     
  10. livetv

    livetv Member

    I pulled from git
    git clone --depth=1 -b MOODLE_28_STABLE --single-branch git://git.moodle.org/moodle.git
    according to the guide - https://docs.moodle.org/28/en/Installing_Moodle
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, I guess you did this as root and not as user of the website? Then you have to run the commands that I posted above:

    chown -R web1:client1 /var/www/clients/client1/web1/web
    chmod 755 /var/www/clients/client1/web1/web
     
  12. livetv

    livetv Member

    Thank you very much Sir
    It Is so good to be here.
    it's working
     

Share This Page