Permission denied
Laur333 opened this issue · comments
Hello and thank you for this very practical software, LibreBooking.
I'm having trouble updating.
I tried a fresh install and update and the result is still the same. I modified the permissions and created a "log" folder but nothing changed.
I thank you in advance for your help.
Good day
Lawrence
UnexpectedValueException: There is no existing directory at "/Web/log" and it could not be created: Permission denied in /home/law/www/resa/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php:216 Stack trace: #0 /home/law/www/resa/vendor/monolog/monolog/src/Monolog/Handler/StreamHandler.php(135): Monolog\Handler\StreamHandler->createDir('/Web/log/app.lo...')
Hi Laur333,
Do you have premission to this folder? Is it solved if you set the full path?
Hi @Laur333
you should specify a full path, like /var/log/librebooking
and make sure that the folder (librebooking in my case) is owned by user www-data
.
In a nutshell, here are the commands to perform:
sudo mkdir /var/log/librebooking`
sudo touch /var/log/librebooking/app.log
sudo touch /var/log/librebooking/sql.log
sudo chown --recursive www-data:www-data /var/log/librebooking
Please, close this issue if the above fixed your problem.
I have the same problems: UnexpectedValueException: The stream or file "/app.log" could not be opened in append mode: Failed to open stream: Permission denied The exception occurred while attempting to log.
Why does the app try to create a log directory in the root directory and not in its own directory? I can't create a directory there. Since I don't have and won't get sudo on the server.
Hi @reaseno
You can modify the log directory for librebooking inside the file config/config.php
.
Use a directory that is owned by user www-data
and create an empty app.log
file also owned by www-data
Thank you very much for all these precisions. I'll try tomorrow.
@colisee
I was just about to write here that I have found the parameter for this. Thank you anyway 👍
@Laur333 , if the solution answers your need, could you please close this issue? Merci.