-
Notifications
You must be signed in to change notification settings - Fork 2.2k
【求助】关于权限问题!!! #2339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
跟showdoc无关。并不是你给了777权限,docker进程就一定可写的。有时候就是收到不明限制。我没研究。我推荐root下安装。 |
感谢大佬回答, 我研究下... |
大佬, 搞了一下午还是搞不定, 换了root用户,还是一样错误, |
我也不知道,应该是基础镜像里的路径。我本身是基于别人的镜像构造的 |
这个权限设定害死人....项目启动 都是正常的...就是无法访问...一访问就报权限不足... |
启动后访问localhost后台得到日志如下:
showdoc | 2025-04-03 11:41:56,554 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message.
showdoc | 2025-04-03 11:41:56,586 INFO Included extra file "/opt/docker/etc/supervisor.d/nginx.conf" during parsing
showdoc | 2025-04-03 11:41:56,586 INFO Included extra file "/opt/docker/etc/supervisor.d/php-fpm.conf" during parsing
showdoc | 2025-04-03 11:41:56,751 INFO RPC interface 'supervisor' initialized
showdoc | 2025-04-03 11:41:56,778 INFO supervisord started with pid 61
showdoc | 2025-04-03 11:41:57,840 INFO spawned: 'nginxd' with pid 63
showdoc | 2025-04-03 11:41:57,841 INFO spawned: 'php-fpmd' with pid 64
showdoc | -> Executing /opt/docker/bin/service.d/nginx.d//10-init.sh
showdoc | 2025-04-03 11:41:57,987 INFO success: nginxd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
showdoc | 2025-04-03 11:41:57,987 INFO success: php-fpmd entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
showdoc | -> Executing /opt/docker/bin/service.d/php-fpm.d//10-init.sh
showdoc | Setting php-fpm user to application
showdoc | [03-Apr-2025 11:42:01] NOTICE: fpm is running, pid 64
showdoc | [03-Apr-2025 11:42:01] NOTICE: ready to handle connections
showdoc |
showdoc | > [email protected] start
showdoc | > npm run pm2 start index.js
showdoc |
showdoc |
showdoc | > [email protected] pm2
showdoc | > node ./node_modules/pm2/bin/pm2 start index.js
showdoc |
showdoc | [PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
showdoc | [PM2] PM2 Successfully daemonized
showdoc | [PM2] Starting /showdoc_data/mock/index.js in fork_mode (1 instance)
showdoc | [PM2] Done.
showdoc | ┌────┬──────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
showdoc | │ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
showdoc | ├────┼──────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
showdoc | │ 0 │ index │ default │ 1.0.0 │ fork │ 115 │ 0s │ 0 │ online │ 0% │ 45.6mb │ root │ disabled │
showdoc | └────┴──────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
showdoc | 2025/04/03 11:42:39 [error] 70#70: *1 "/app/index.php" is forbidden (13: Permission denied), client: 172.29.77.123, server: _, request: "GET / HTTP/1.1", host: "showdoc.FDSFSD.com:666"
showdoc | 172.29.77.123 - - [03/Apr/2025:11:42:39 +0800] "GET / HTTP/1.1" 403 555 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36 Edg/125.0.0.0"
showdoc | 2025/04/03 11:42:40 [crit] 70#70: *1 stat() "/app/favicon.ico" failed (13: Permission denied), client: 172.29.77.123, server: _, request: "GET /favicon.ico HTTP/1.1", host: "showdoc.FDSFSD.com:666", referrer: "https://showdoc.FDSFSD.com:666/"
威联通nas
使用的是自定义 admin权限的 aaa用户登录(非root用户)
创建了对应的文件夹 mkdir -p /showdoc_data/html
在命令行中也使用了chmod -R 777 /showdoc_data
根据日志来看 "/app/index.php" is forbidden (13: Permission denied) ,是/app文件夹没权限,
但是我在html目录下没找到 app文件夹...
有没有大佬指点一下.(其他十来个docker应用均正常运行)
The text was updated successfully, but these errors were encountered: