Closed leuchtrakete666 closed 3 years ago
Ohh..God .. save me. I will have to reproduce that.
This has nothing todo with YunoHost.
@anmol26s Please close the issue
@leuchtrakete666 please contact me as explained here: https://www.kimai.org/documentation/buy-a-plugin.html
BTW in almost 100% of all cases this error comes from wrong file permissions. Fix them as explained here: http://kimai.org/documentation/cache.html
@anmol26s maybe you can document the webserver user somewhere? I guess it is not www-data?
@anmol26s maybe you can document the webserver user somewhere? I guess it is not www-data? You mean this? https://github.com/YunoHost-Apps/kimai2_ynh/blob/master/scripts/install#L171
I guess I will have to add few more rules under it?
chmod -R g+r .
chmod -R g+rw var/
chmod -R g+rw public/avatars/
Not necessarily.
In my demo script I am setting the group
, which doesn't have write permissions by default.
But your script changes the user
, which should always have the write permissions.
And its applied from kimai root, so it should work.
But if y user now triggers the bin/console kimai:reload
command to flush the cache, the cache files and directories are recreated under his account. And then the $app user cannot write runtime files, leading to a 500 error.
So we need to know which user is $app and how can a YunoHost admin fix the file permissions after the cache was manually reloaded.
I would have to change it to something like below command, so that user can have access and run this. $ USER /usr/bin/phpPHPVERSION PATH/bin/console kimai:reload
Maybe I can do it on cron?
thanks again for all your efforts. i just reacently discovered yunohost and i like it a lot.
i want to use this service for my small company. kimai, baikal, nextcloud and dolibarr. perfect kombination.
thanks to @kevinpapst here is the solution:
after running the bin/console kimai:reload
command the cache is rebuilt and the system changes group and user of the files to root.
so simply change the group:owner back to kimai2.
move to ../kimai2 folder and enter this commands:
chown -R kimai2:kimai2 .
chmod -R g+r .
chmod -R g+rw var/
chmod -R g+rw public/avatars/
and everything works fine again.
thank you @kevinpapst and thank you @anmol26s
edit: i should mention, this works with yunohost, because the server user is kimai2. on a different system it might be a different user.
i am back ...
i installed the MetaFieldsBundle Plugin. i did as i was instructed. created the folder in ../var/plugins, cleared cache and created database.
thats the outcome:
thats the terminal output of clearing the cache:
and thats what happens when i create the database: