{"action":"created","issue":{"url":"https://api.github.com/repos/piwik/piwik-package/issues/19","labels_url":"https://api.github.com/repos/piwik/piwik-package/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/piwik/piwik-package/issues/19/comments","events_url":"https://api.github.com/repos/piwik/piwik-package/issues/19/events","html_url":"https://github.com/piwik/piwik-package/issues/19","id":53518006,"number":19,"title":"Let the auto-archive cron job write its log file to /var/log/piwik/archive.log","user":{"login":"nicwortel","id":1055691,"avatar_url":"https://avatars.githubusercontent.com/u/1055691?v=3","gravatar_id":"","url":"https://api.github.com/users/nicwortel","html_url":"https://github.com/nicwortel","followers_url":"https://api.github.com/users/nicwortel/followers","following_url":"https://api.github.com/users/nicwortel/following{/other_user}","gists_url":"https://api.github.com/users/nicwortel/gists{/gist_id}","starred_url":"https://api.github.com/users/nicwortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicwortel/subscriptions","organizations_url":"https://api.github.com/users/nicwortel/orgs","repos_url":"https://api.github.com/users/nicwortel/repos","events_url":"https://api.github.com/users/nicwortel/events{/privacy}","received_events_url":"https://api.github.com/users/nicwortel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-06T14:11:06Z","updated_at":"2015-01-16T10:07:40Z","closed_at":"2015-01-16T00:53:18Z","body":"Currently the `piwik-archive` cron does not save any logging information at all (by default). But since a log directory is created by the package anyway (/var/log/piwik), wouldn't it be nice to let the cron job save its result to a log file in that directory? For instance /var/log/piwik/archive.log.\r\n\r\nThe only caveat would be that the job needs to be run by root instead of www-data. Would that be considered a bad practice?"},"comment":{"url":"https://api.github.com/repos/piwik/piwik-package/issues/comments/70232774","html_url":"https://github.com/piwik/piwik-package/issues/19#issuecomment-70232774","issue_url":"https://api.github.com/repos/piwik/piwik-package/issues/19","id":70232774,"user":{"login":"nicwortel","id":1055691,"avatar_url":"https://avatars.githubusercontent.com/u/1055691?v=3","gravatar_id":"","url":"https://api.github.com/users/nicwortel","html_url":"https://github.com/nicwortel","followers_url":"https://api.github.com/users/nicwortel/followers","following_url":"https://api.github.com/users/nicwortel/following{/other_user}","gists_url":"https://api.github.com/users/nicwortel/gists{/gist_id}","starred_url":"https://api.github.com/users/nicwortel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicwortel/subscriptions","organizations_url":"https://api.github.com/users/nicwortel/orgs","repos_url":"https://api.github.com/users/nicwortel/repos","events_url":"https://api.github.com/users/nicwortel/events{/privacy}","received_events_url":"https://api.github.com/users/nicwortel/received_events","type":"User","site_admin":false},"created_at":"2015-01-16T10:07:40Z","updated_at":"2015-01-16T10:07:40Z","body":"Hi @aureq,\r\n\r\nThanks for the update! However, have you tested this? In my case (Ubuntu server), the logs can not be saved because the user www-data has no write access to the /var/log/piwik directory (owned by root).\r\n\r\nShould the ownership of the /var/log/piwik directory be changed to www-data, or should the crontab be executed as root?\r\n\r\nI previously ran the crontab as root but since the default cron file that comes with piwik contains 'www-data' as user, I wonder what the preferred solution is."}}