Systemd를 사용하여 EC2 CentOS에서 Airflow 웹 서버 실행: 권한이 거부되었습니다.

Systemd를 사용하여 EC2 CentOS에서 Airflow 웹 서버 실행: 권한이 거부되었습니다.

나는 그것을 사용하고 있다공기 흐름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

이것도움이 안돼.

관련 정보