GithubHelp home page GithubHelp logo

Comments (9)

leuchtrakete666 avatar leuchtrakete666 commented on August 28, 2024 1

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.

from kimai2_ynh.

anmol26s avatar anmol26s commented on August 28, 2024

Ohh..God .. save me. I will have to reproduce that.

from kimai2_ynh.

kevinpapst avatar kevinpapst commented on August 28, 2024

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

from kimai2_ynh.

kevinpapst avatar kevinpapst commented on August 28, 2024

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

from kimai2_ynh.

kevinpapst avatar kevinpapst commented on August 28, 2024

@anmol26s maybe you can document the webserver user somewhere? I guess it is not www-data?

from kimai2_ynh.

anmol26s avatar anmol26s commented on August 28, 2024

@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/

from kimai2_ynh.

kevinpapst avatar kevinpapst commented on August 28, 2024

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.

from kimai2_ynh.

anmol26s avatar anmol26s commented on August 28, 2024

I would have to change it to something like below command, so that user can have access and run this.
$ USER /usr/bin/php__PHPVERSION__ PATH/bin/console kimai:reload

Maybe I can do it on cron?

from kimai2_ynh.

leuchtrakete666 avatar leuchtrakete666 commented on August 28, 2024

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.

from kimai2_ynh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.