You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-11-07 17:12:01

Changemanager
Member
Registered: 2023-02-21
Posts: 39

Error: glpi/src/Toolbox.php at line 599

Good morning,

I keep getting this error continuously, does anyone know what's happening to it?

The specified file exists and gets updated when there's an event. I don't understand.


[2023-11-07 15:59:17] glpiphplog.WARNING:   *** PHP Warning (2): error_log(/glpi/files/_log/cron.log): Failed to open stream: Permission denied in /glpi/src/Toolbox.php at line 599
  Backtrace :
  src/Toolbox.php:599                                error_log()
  src/CronTask.php:1064                              Toolbox::logInFile()
  front/cron.php:64                                  CronTask::launch()
  public/index.php:82                                require()

[2023-11-07 16:33:58] glpiphplog.WARNING:   *** PHP Warning (2): error_log(/glpi/files/_log/mail.log): Failed to open stream: Permission denied in /glpi/src/Toolbox.php at line 599
  Backtrace :
  src/Toolbox.php:599                                error_log()
  src/NotificationMailing.php:194                    Toolbox::logInFile()
  src/Notification.php:624                           NotificationMailing->sendNotification()
  src/NotificationEventAbstract.php:146              Notification::send()
  src/NotificationEvent.php:187                      NotificationEventAbstract::raise()
  src/ITILFollowup.php:284                           NotificationEvent::raiseEvent()
  src/CommonDBTM.php:1324                            ITILFollowup->post_addItem()
  front/itilfollowup.form.php:55                     CommonDBTM->add()
  public/index.php:82                                require()


Thank you.

Last edited by Changemanager (2023-11-07 17:36:54)

Offline

#2 2023-11-08 03:48:00

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Error: glpi/src/Toolbox.php at line 599

Either the file permissions for your files/_log folder/contents are messed up or you have SELinux enabled and there is a configuration issue where access to the logs folder is denied.
Most of the time, this issue is causing by running a cron job as root instead of www-data which causes root to steal ownership of every file it touches.


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#3 2023-11-08 10:21:30

Changemanager
Member
Registered: 2023-02-21
Posts: 39

Re: Error: glpi/src/Toolbox.php at line 599

cconard96 wrote:

Either the file permissions for your files/_log folder/contents are messed up or you have SELinux enabled and there is a configuration issue where access to the logs folder is denied.
Most of the time, this issue is causing by running a cron job as root instead of www-data which causes root to steal ownership of every file it touches.

OK, i have de cron job with Root, how i can change it?

thank you

Offline

#4 2023-11-08 12:03:14

cconard96
Moderator
Registered: 2018-07-31
Posts: 2,809
Website

Re: Error: glpi/src/Toolbox.php at line 599

Remove the line from the root user's crontab.
Edit the crontab for www-data (or whatever user your web server runs with) and add the line there:
sudo crontab -e -u www-data

Manually fix permissions on your GLPI "files" folder and contents. They should be owned by www-data (or your web server user).


GLPI Collaborator and Plugin Developer.
My non-English comments are automated translations. Sorry for any confusion that causes.
Mes commentaires non anglais sont des traductions automatiques. Désolé pour toute confusion qui cause.
Mis comentarios que no están en inglés son traducciones automáticas. Perdón por cualquier confusión que cause.

Offline

#5 2023-11-08 12:12:53

Changemanager
Member
Registered: 2023-02-21
Posts: 39

Re: Error: glpi/src/Toolbox.php at line 599

okey thank you!

Offline

#6 2024-08-13 04:56:26

McHenry
Member
Registered: 2024-06-01
Posts: 57

Re: Error: glpi/src/Toolbox.php at line 599

Solved a few errors for me too.

Thanks for your contributions here Conrad.

Offline

Board footer

Powered by FluxBB