July 7, 2012 by Al
Setting up a server running Fedora is a pain. There are so many little things one must do to please selinux. One of those is enabling the user directories to have web access. Here is a sequence that worked on Fedora 17. It is used to get a specific user using its home dir (by default ~/public_html/) with Apache.
Load /etc/httpd/conf/httpd.conf into an editor
Change ‘UserDir disabled’ to ‘UserDir enabled’ and list affected user names
Uncomment the ‘UserDir public_html’ line
Uncomment the ‘<Directory /home/*/public_html>’ directive.
Apply the proper permissions:
# chmod 711 ~<username> for all the usernames you listed on the “enabled” line above.
# chmod 755 -R ~<username>/public_html/ for all the usernames you listed on the “enaabled” line
Run the following commands to please SELinux
# setsebool -P httpd_enable_homedirs true
# chcon -R -t httpd_sys_content_t ~
# service httpd restart
Category Technology | Tags:
Sorry, comments are closed.