Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    cronjob error because of wrong user www-data

    Scheduled Pinned Locked Moved Operating
    4 Posts 2 Posters 829 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      syntax_error
      last edited by

      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.

      MartinVM 1 Reply Last reply Reply Quote 0
      • MartinVM Offline
        MartinV @syntax_error
        last edited by MartinV

        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.

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          syntax_error @MartinV
          last edited by

          @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

          MartinVM 1 Reply Last reply Reply Quote 0
          • MartinVM Offline
            MartinV @syntax_error
            last edited by

            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).

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post