![Systemd를 사용하여 EC2 CentOS에서 Airflow 웹 서버 실행: 권한이 거부되었습니다.](https://linux55.com/image/163175/Systemd%EB%A5%BC%20%EC%82%AC%EC%9A%A9%ED%95%98%EC%97%AC%20EC2%20CentOS%EC%97%90%EC%84%9C%20Airflow%20%EC%9B%B9%20%EC%84%9C%EB%B2%84%20%EC%8B%A4%ED%96%89%3A%20%EA%B6%8C%ED%95%9C%EC%9D%B4%20%EA%B1%B0%EB%B6%80%EB%90%98%EC%97%88%EC%8A%B5%EB%8B%88%EB%8B%A4..png)
나는 그것을 사용하고 있다공기 흐름EC2 CentOS에서체계공기 흐름 프로세스(예: 네트워크 서버, 작업자 스레드 및 스케줄러)를 시작하는 데 사용되는 데몬을 관리합니다. 내가 달릴 때sudo systemctl start airflow-webserver
: ec2-user : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl enable airflow-webserver
Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal sudo[11680]: ec2-user : TTY=pts/0 ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl start airflow-webserver
Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[11684]: Failed at step EXEC spawning /home/ec2-user/.local/bin/airflow: Permission denied
Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[1]: airflow-webserver.service: main process exited, code=exited, status=203/EXEC
Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[1]: Unit airflow-webserver.service entered failed state.
Oct 30 01:27:37 ip-171-32-6-92.us-east-2.compute.internal systemd[1]: airflow-webserver.service failed
airflow webserver.service
[Unit]
Description=Airflow webserver daemon
After=network.target postgresql.service mysql.service redis.service rabbitmq-server.service
Wants=postgresql.service mysql.service redis.service rabbitmq-server.service
[Service]
EnvironmentFile=/etc/sysconfig/airflow
User=airflow
Group=airflow
Type=simple
ExecStart=/home/ec2-user/.local/bin/airflow webserver --pid /run/airflow/webserver.pid
RestartSec=5s
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Airflow 그룹 및 사용자가 존재합니다.
$ less /etc/group
# airflow:x:1001:ec2-user
$less etc/psswd
# ec2-user:x:1000:1000:EC2 Default User:/home/ec2-user:/bin/bash
# tss:x:59:59:Account used by the trousers package to sandbox the tcsd # daemon:/dev/null:/sbin/nologin
# airflow:x:1001:1001::/home/airflow:/bin/bash
이것도움이 안돼.