Skip to main content

Data directory is not writable even after chmod - Managing Deskpro On-Premise / Installation & Upgrades - Deskpro Support

Data directory is not writable even after chmod

Authors list

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.
Helpful Unhelpful

10 of 26 people found this page helpful

Add a comment

Please log in or register to submit a comment.

Need a password reminder?