0

I am trying to run a command :

celery -A main:celery_app beat --logfile=/var/log/celery/celerybeat.log

It shows permission denied error:

stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/var/log/celery/celerybeat.log

but i think i have correct permissions. When i run ls -la /var/log/celery/celerybeat.log I got

-rw-rw-r-- 1 celery celery 0 Jan 12 14:18 /var/log/celery/celerybeat.log

and for celery command i checked in systemd file, it has celery defined as its user and group. Why is there such an error?

  • 1
    Possible duplicate of celery daemon using systemd not running in ubuntu 16.04 – user589808 Jan 19 '17 at 6:40
  • @CelticWarrior how is it even a duplicate?? that question was about celery daemon not running properly. but here daemon is running properly but unable to access file and thats why file permission error – anekix Jan 19 '17 at 6:42
  • Accessing /var needs root. – user589808 Jan 19 '17 at 6:46
  • @CelticWarrior celery daemon is also running as celery user and logging into /var/log/celery/ daemon does not have root access. how is that running then? – anekix Jan 19 '17 at 6:50
  • @CelticWarrior how can i debug the cause? – anekix Jan 19 '17 at 6:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.