ubuntu - 无法将文件上传到我的网络服务器,权限错误
问题描述
我正在运行Ghost,当我通过管理门户上传主题时,出现以下错误:
EACCES: permission denied, mkdir '/var/www/my.website/content/themes/London-master'
我确定这是一个权限错误,但我一直在寻找如何修复它。运行 ghost 程序的用户是ghost_server_user
,我使用的是 Ubuntu 20.04 Server。
编辑:我在机器上拥有完全的 root 访问权限。
解决方案
According to the Ghost documentation, you have to configure correct permission for the Ghost installation directory. Ghost should not be installed as the root user.
Try to set correct permission for the folders again.
# Set directory owner: Replace <user> with the name of your user
sudo chown <user>:<user> /var/www/sitename
# Set the correct permissions
sudo chmod 775 /var/www/sitename
推荐阅读
- service - 当策略中有多个服务时,Ansible for Fortigate 策略不起作用
- automation - 脚本 - 与 Azure VM 交互
- javascript - 为什么多个远程联合模块不适用于多个远程子反应应用程序和父应用程序?
- snowflake-cloud-data-platform - load_history 视图是否显示使用 copy into 命令加载的空文件的记录?
- python - pyodbc.ProgrammingError: ('SQL 包含 2 个参数标记,但提供了 34 个参数', 'HY000')
- unit-testing - 将逻辑放在对象的密钥对值中是一种好习惯吗?(声纳问题)
- python-3.x - 如何在 Python 3.8 中过滤两个 dict 列表
- python - Python - 将数据拟合到双指数函数
- magento2 - Magento 2:从自定义来源获取库存数量
- go - 如何正确从 GO 中的 url 获取内容?