PHP Warning: mkdir()...Permission denied

本文介绍了解决因权限不足而导致无法创建文件夹的问题。通过将父级目录的权限设置为0777,可以成功创建所需的文件夹。具体操作包括使用命令行工具chmod进行权限更改。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

原因:

权限不足,无法创建文件夹。

解决:

修改父级目录权限为0777

命令行:

chmod -R 777 ./dirname


(d2l_env) root@wang-VMware-Virtual-Platform:/home/wang# jupyter notebook [I 2025-08-18 15:31:49.084 ServerApp] jupyter_lsp | extension was successfully linked. [I 2025-08-18 15:31:49.087 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2025-08-18 15:31:49.091 ServerApp] jupyterlab | extension was successfully linked. [I 2025-08-18 15:31:49.095 ServerApp] notebook | extension was successfully linked. [I 2025-08-18 15:31:49.334 ServerApp] notebook_shim | extension was successfully linked. [I 2025-08-18 15:31:49.347 ServerApp] notebook_shim | extension was successfully loaded. [I 2025-08-18 15:31:49.348 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2025-08-18 15:31:49.349 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2025-08-18 15:31:49.351 LabApp] JupyterLab extension loaded from /root/miniconda3/envs/d2l_env/lib/python3.11/site-packages/jupyterlab [I 2025-08-18 15:31:49.351 LabApp] JupyterLab application directory is /root/miniconda3/envs/d2l_env/share/jupyter/lab [I 2025-08-18 15:31:49.352 LabApp] Extension Manager is 'pypi'. [I 2025-08-18 15:31:49.391 ServerApp] jupyterlab | extension was successfully loaded. [I 2025-08-18 15:31:49.394 ServerApp] notebook | extension was successfully loaded. [I 2025-08-18 15:31:49.394 ServerApp] The port 8888 is already in use, trying another port. [I 2025-08-18 15:31:49.395 ServerApp] The port 8889 is already in use, trying another port. [C 2025-08-18 15:31:49.395 ServerApp] Running as root is not recommended. Use --allow-root to bypass. (d2l_env) root@wang-VMware-Virtual-Platform:/home/wang# jupyter notebook --ip=0.0.0.0 --port=8888 [I 2025-08-18 15:32:09.743 ServerApp] jupyter_lsp | extension was successfully linked. [I 2025-08-18 15:32:09.747 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2025-08-18 15:32:09.750 ServerApp] jupyterlab | extension was successfully linked. [I 2025-08-18 15:32:09.753 ServerApp] notebook | extension was successfully linked. [I 2025-08-18 15:32:09.993 ServerApp] notebook_shim | extension was successfully linked. [I 2025-08-18 15:32:10.006 ServerApp] notebook_shim | extension was successfully loaded. [I 2025-08-18 15:32:10.008 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2025-08-18 15:32:10.009 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2025-08-18 15:32:10.011 LabApp] JupyterLab extension loaded from /root/miniconda3/envs/d2l_env/lib/python3.11/site-packages/jupyterlab [I 2025-08-18 15:32:10.011 LabApp] JupyterLab application directory is /root/miniconda3/envs/d2l_env/share/jupyter/lab [I 2025-08-18 15:32:10.011 LabApp] Extension Manager is 'pypi'. [I 2025-08-18 15:32:10.049 ServerApp] jupyterlab | extension was successfully loaded. [I 2025-08-18 15:32:10.052 ServerApp] notebook | extension was successfully loaded. [I 2025-08-18 15:32:10.053 ServerApp] The port 8888 is already in use, trying another port. [I 2025-08-18 15:32:10.053 ServerApp] The port 8889 is already in use, trying another port. [C 2025-08-18 15:32:10.053 ServerApp] Running as root is not recommended. Use --allow-root to bypass. (d2l_env) root@wang-VMware-Virtual-Platform:/home/wang# jupyter notebook --allow-root [I 2025-08-18 15:32:33.381 ServerApp] jupyter_lsp | extension was successfully linked. [I 2025-08-18 15:32:33.384 ServerApp] jupyter_server_terminals | extension was successfully linked. [I 2025-08-18 15:32:33.389 ServerApp] jupyterlab | extension was successfully linked. [I 2025-08-18 15:32:33.392 ServerApp] notebook | extension was successfully linked. [I 2025-08-18 15:32:33.630 ServerApp] notebook_shim | extension was successfully linked. [I 2025-08-18 15:32:33.643 ServerApp] notebook_shim | extension was successfully loaded. [I 2025-08-18 15:32:33.644 ServerApp] jupyter_lsp | extension was successfully loaded. [I 2025-08-18 15:32:33.645 ServerApp] jupyter_server_terminals | extension was successfully loaded. [I 2025-08-18 15:32:33.647 LabApp] JupyterLab extension loaded from /root/miniconda3/envs/d2l_env/lib/python3.11/site-packages/jupyterlab [I 2025-08-18 15:32:33.647 LabApp] JupyterLab application directory is /root/miniconda3/envs/d2l_env/share/jupyter/lab [I 2025-08-18 15:32:33.647 LabApp] Extension Manager is 'pypi'. [I 2025-08-18 15:32:33.685 ServerApp] jupyterlab | extension was successfully loaded. [I 2025-08-18 15:32:33.688 ServerApp] notebook | extension was successfully loaded. [I 2025-08-18 15:32:33.688 ServerApp] The port 8888 is already in use, trying another port. [I 2025-08-18 15:32:33.688 ServerApp] The port 8889 is already in use, trying another port. [I 2025-08-18 15:32:33.689 ServerApp] Serving notebooks from local directory: /home/wang [I 2025-08-18 15:32:33.689 ServerApp] Jupyter Server 2.16.0 is running at: [I 2025-08-18 15:32:33.689 ServerApp] http://localhost:8890/tree?token=1e0460c42c80c5618f39a5208bc667b8765429bd0a202b55 [I 2025-08-18 15:32:33.689 ServerApp] http://127.0.0.1:8890/tree?token=1e0460c42c80c5618f39a5208bc667b8765429bd0a202b55 [I 2025-08-18 15:32:33.689 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 2025-08-18 15:32:33.810 ServerApp] To access the server, open this file in a browser: file:///root/.local/share/jupyter/runtime/jpserver-10883-open.html Or copy and paste one of these URLs: http://localhost:8890/tree?token=1e0460c42c80c5618f39a5208bc667b8765429bd0a202b55 http://127.0.0.1:8890/tree?token=1e0460c42c80c5618f39a5208bc667b8765429bd0a202b55 [I 2025-08-18 15:32:33.823 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server Opening "/root/.local/share/jupyter/runtime/jpserver-10883-open.html" with Text Editor (text/html) (gnome-text-editor:11112): Gtk-WARNING **: 15:32:34.255: Unable to acquire session bus: 执行子进程“dbus-launch”失败(没有那个文件或目录) mkdir: cannot create directory ‘/run/user/0’: Permission denied Authorization required, but no authorization protocol specified Error: cannot open display: :0 mkdir: cannot create directory ‘/run/user/0’: Permission denied Authorization required, but no authorization protocol specified Error: cannot open display: :0 /usr/bin/xdg-open: 882: iceweasel: not found /usr/bin/xdg-open: 882: seamonkey: not found /usr/bin/xdg-open: 882: mozilla: not found /usr/bin/xdg-open: 882: epiphany: not found /usr/bin/xdg-open: 882: konqueror: not found /usr/bin/xdg-open: 882: chromium: not found /usr/bin/xdg-open: 882: chromium-browser: not found /usr/bin/xdg-open: 882: google-chrome: not found /usr/bin/xdg-open: 882: www-browser: not found /usr/bin/xdg-open: 882: links2: not found /usr/bin/xdg-open: 882: elinks: not found /usr/bin/xdg-open: 882: links: not found /usr/bin/xdg-open: 882: lynx: not found /usr/bin/xdg-open: 882: w3m: not found xdg-open: no method available for opening 'file:///root/.local/share/jupyter/runtime/jpserver-10883-open.html' context mismatch in svga_surface_destroy
最新发布
08-19
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值