Skip to content
Discussion options

You must be logged in to vote

Solution: Fix SELinux Permissions

Change context — Set the SELinux security context on files/directories

chcon -Rv -t httpd_sys_rw_content_t /var/www/privatebin

Breaking down the flags:
-R = Recursive
-t = Type of SELinux context

SELinux contexts have four parts (user:role:type:level), and type is the one that matters most for access control. httpd_sys_rw_content_t specifically tells SELinux that web server processes are allowed to read and write this content.

The common httpd types:

httpd_sys_content_t — web server can read only
httpd_sys_rw_content_t — web server can read and write
httpd_sys_script_exec_t — web server can execute these as scripts

Verify permissions

ls -Zd /var/www/priva…

Replies: 3 comments 6 replies

Comment options

You must be logged in to vote
2 replies
@cloudscape-germany
Comment options

@elrido
Comment options

Comment options

You must be logged in to vote
1 reply
@elrido
Comment options

Comment options

You must be logged in to vote
3 replies
@elrido
Comment options

@elrido
Comment options

@cloudscape-germany
Comment options

Answer selected by elrido
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants