doufu6130 2015-09-21 22:03
浏览 77
已采纳

上传WordPress文件的权限问题

I am running a Ubuntu self-managed VPS. I've installed wordpress and have assigned a user dev to have full write and access permission through the group www-data. Now when I go to install a theme through wordpress I receive a section that ask me for FTP credentials. I assume this is because wordpress finds it is unable to write to wp-content? I went ahead and assigned a chmod 757 to the wp-content directory and it worked but gave me an error message: The uploaded file could not be moved to wp-content/uploads/2015/09.

I have checked who owns what and so far everything seems to be owned by dev user and belongs to group www-data.

Any suggestions?

  • 写回答

1条回答 默认 最新

  • duanjiao6711 2015-09-21 22:08
    关注

    Chmod 757 makes it so that the group only has read and execute permissions. It is better to have it set to 775. I suspect you also didn't chmod recursively to include all subdirectories. Try this: chmod -R 775 wp-content.

    After chatting, we also had to do chown -R www-data wordpress and that fixed the problem.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Vue3 大型图片数据拖动排序
  • ¥15 划分vlan后不通了
  • ¥15 GDI处理通道视频时总是带有白色锯齿
  • ¥20 用雷电模拟器安装百达屋apk一直闪退
  • ¥15 算能科技20240506咨询(拒绝大模型回答)
  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大