Programming and accessibility tips

from the Cynthia Network

SELinux »

Give a web server read/write permission to a directory with SELinux

By default, SELinux restricts the level of access that a web server has to files and directories. A dynamic website (like a wiki) may need permisiion to create or edit content files. The chcon utility can be used to make changes to the security configurations.

The following command will give the web server read/write access to the directory <directory>:

chcon -R -t httpd_sys_rw_content_t <directory>

The -t flag specifies the type of the security context. The value -t httpd_sys_rw_content_t instruct chcon to grant read/write permission to the web server. The -R flag makes the changes recursively inside <directory>.

Computer science help

Programming

User

By Bill Hollingsworth
© 2016 by Cynsight, LLC.
Cynthia™ is a trademark of Cynsight, LLC.

^