Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7609441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T01:10:20+00:00 2026-05-31T01:10:20+00:00

I have some periodic tasks that I run with celery (daemonized by supervisord), but

  • 0

I have some periodic tasks that I run with celery (daemonized by supervisord), but after trying to create a directory in the home dir for the user i setup for the supervisor’d process I got a “permission denied” error. After looking at the os.environ dict in a running celery task I noticed that the USER var is set to ‘root’ and not the user that I set up in my supervisord config for celery.

This is what my /usr/local/etc/supervisord.conf looks like:

[unix_http_server]
file=/tmp/supervisor.sock
chmod=0777

[supervisord]
logfile=/var/log/supervisord.log
pidfile=/var/run/supervisord.pid

[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock

[program:celery]
command=/home/<USER>/.virtualenvs/sync/bin/celeryd --beat --loglevel=INFO
environment=PYTHONPATH=/home/<USER>/apps/sync
directory=/home/<USER>/apps/sync
user=<USER>
numprocs=1
stdout_logfile=/var/log/celeryd.log
stderr_logfile=/var/log/celeryd.log
autostart=true
autorestart=true
startsecs=10
stopwaitsecs = 30

What could be causing this? Any help would be super appreciated!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T01:10:21+00:00Added an answer on May 31, 2026 at 1:10 am

    I believe this is caused by the fact that you didn’t set the HOME and USER environment variables. This is necessary when using the “user=” option if your subprocess relies on those being set.

    After supervisord documentation on Subprocess Environment:

    No shell is executed by supervisord when it runs a subprocess, so environment variables such as USER, PATH, HOME, SHELL, LOGNAME, etc. are not changed from their defaults or otherwise reassigned

    So perhaps try:

    environment=USER=<USER>,HOME=/home/<USER>,PYTHONPATH=/home/<USER>/apps/sync
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use rufus-scheduler to run some periodic tasks, but they are extremely annoying to
I have some periodic data, but the amount of data is not a multiple
Some facts about my data I have a TablePattern that defines periodic day pattern
I have simple PyGTK app. Since I have to run multiple periodic tasks to
Currently I have a background thread that does some periodic heavy data management. Because
I have some perl code that looks something like this: my @array = map
I have some input elements that the users are request special behavior on pageup
I have some UIViews that have different centers and transforms applied to them. I
I have some external Javascript files in my GWT app that I only want
Have some data in a sybase image type column that I want to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.