【发布时间】:2019-05-13 21:44:31
【问题描述】:
我可以上传文件但不能删除它。
我有一个 nginx、laravel 和 redis 容器。
当我上传队列时,将文件和文件夹创建到 /var/www/storage/app/public(laravel 容器)
此文件夹通过 docker 卷与主机共享。
当我尝试删除文件和文件夹时,我无法删除,因为我没有权限...
我试图在 www.conf 中将 php-fpm 用户从 www-data 更改为 root 我尝试以 root 用户身份启动 supervisord 队列进程和 fpm
www.conf
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
; will be used.
user = www-data
group = www-data
supervisord.conf
[program:php-fpm]
command=/usr/local/sbin/php-fpm -F
autostart=true
autorestart=true
priority=5
stdout_events_enabled=true
stderr_events_enabled=true
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=php /var/www/artisan queue:work redis --sleep=3 --tries=3
autostart=true
autorestart=true
user=root
numprocs=8
priority=10
redirect_stderr=true
stdout_logfile=/var/www/storage/logs/worker.log
【问题讨论】:
标签: php docker nginx supervisord