首页 > 解决方案 > 无法将文件上传到我的网络服务器,权限错误

问题描述

我正在运行Ghost,当我通过管理门户上传主题时,出现以下错误:

EACCES: permission denied, mkdir '/var/www/my.website/content/themes/London-master'

我确定这是一个权限错误,但我一直在寻找如何修复它。运行 ghost 程序的用户是ghost_server_user,我使用的是 Ubuntu 20.04 Server。

编辑:我在机器上拥有完全的 root 访问权限。

标签: ubuntupermissionsghost-blog

解决方案


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

推荐阅读