跳到主要内容

Data directory is not writable even after chmod - 知识库 / Deskpro Legacy - Deskpro Support

WARNING: You're browsing documentation for an older version of Deskpro. Consider upgrading to Deskpro Horizon

Data directory is not writable even after chmod

作者列表

Question

The installer tells me that my data directory isn't writable. I used chmod to make it writable, but I still get the message. It seems like chmod is not working. What's going on?

 

Answer (Apache)

This can happen in distributions that use the SE Linux access control mechanism. SE Linux access policies are separate from file permissions. You likely have an SE Linux policy that prevents Apache from writing to files within its root folder (e.g. /var/www).

To test this, temporarily disable SE Linux:

 

$ echo 0 >/selinux/enforce$ cat /selinux/enforce # should output "0"

 

If it is SELinux causing the problem, you can either leave it off (losing the security benefits) or turn it back on and fine-tune your SELinux access controls.

This command will make the data directory writable with SE Linux on:

 

chcon --type=httpd_sys_rw_content_t /var/www/data/ 

 

 Answer (Nginx)


You will want to set SELinux into permissive mode:

$ semanage permissive -a httpd_t

See Nginx documentation for further assistance.
有帮助 没有帮助

84 人中 35 人认为这个页面有帮助

添加一条评论

请登录或注册以提交评论。

是否需要密码提醒?