Yii2项目在Linux上部署报错:The directory is not writable by the Web process ...

原因是执行目录没有写权限,需要确认以下两个问题:

查看部分文件的读写权限是否打开,推荐查一下 chmod 和 chown这两命令解决

1 、网站目录是否属于 nginx的运行用户,假定nginx的运行目录是www,执行以下命令

chown -R www domain(web目录)

  

2、 nginx的运行用户对于报错目录是否有写权限

chmod +w www /www/domian/web/assets

  

可能需要修改的目录有:

chmod -R 777 /frontend/web/assets
chmod 666 /frontend/web/newfile.txt 
chmod 777 /frontend/runtime

  

chmod('runtime', 0777)...done.
chmod('web/assets', 0777)...done.
chmod('yii', 0755)...done.

相关文章:

  • 2022-12-23
  • 2021-10-13
  • 2022-12-23
  • 2022-12-23
  • 2021-05-12
  • 2022-12-23
  • 2022-12-23
  • 2021-10-02
猜你喜欢
  • 2021-09-15
  • 2022-01-26
  • 2022-01-10
  • 2021-06-23
  • 2022-02-28
  • 2022-12-23
  • 2021-12-06
相关资源
相似解决方案