简体   繁体   中英

Gunicorn and Supervisor error file does not have executable permissions

I'm trying to run this command:

sudo supervisorctl start gunicorn_process

On Ubuntu and I get this error:

在此处输入图片说明

As you can see the file 'does' have executable permissions.

gunicorn_process file:

[program:gunicorn_process]
command=/srv/domain wsgi:application
directory=/srv/domain
user=root

the command directive requires an executable command which supervisor runs.

You say you want to run

gunicorn wsgi:application

then set your configuration like so:

[program:gunicorn_process]
command=gunicorn wsgi:application
directory=/srv/domain
user=root

Two things to take into account:

  1. You should not run your wsgi app as root. There's a potential security issue right there. Create a user which has no extra privileges which is only meant to run your web applications and servers.

  2. You might want to change the command directive to include the full path of gunicorn executable. Do a which gunicorn to find out where it exists. For example: command=/usr/bin/gunicorn wsgi:application

使文件可执行: sudo chmod u+x gunicorn_process

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM