cronjob error because of wrong user www-data
-
I get the follwing cronjob error
Archive i-doit logbook sudo: unknown user: www-data sudo: unable to initialize policy plugin Command 'logbook-archive' failed Operation failed. Please check what is wrong and try again.
I could not find the file where I can set that user. We have to change the user to apache because we don't use a Debian here.
-
What probably is executed as a cronjob is /usr/local/bin/idoit-jobs which in turn calls /usr/local/bin/idoit. Both files are not part of the i-doit distribution, but are described in the Knowledge base.
In both scripts the apache user to be used is set in the environment variable APACHE_USER.
-
@martinv
I thought that this user would be set in /etc/i-doit/i-doit.sh so I did set it.
Let's see if this helps as I didn't get an email with this error last night.Cheers
-
I thought that this user would be set in /etc/i-doit/i-doit.sh so I did set it.
/usr/local/bin is the path suggested by the Knowledge base article linked above, as are the file names. If your i-doit sysadmin decided to place the files somewhere else or name them differently, you have to find them in your local system and act accordingly.
One file (named idoit-jobs in the Knowledge base article) executes various tasks on the i-doit database, and the other one (named idoit) implements the basic i-doit console invocation. The former calls the latter (which you can see by the enviroment variable CONSOLE_BIN set in the file).