Mike's face
Saturday, February 16th, 2019

Apache user dirs not always working

Wednesday March 2, 2005 13:18

Even with /home, /home/user, /home/user/public_html properly set, a localhost/~user/ sometimes still doesn't work.  Here's why.

If you haven't been introduced to 'SELinux', you'll have some reading to do.  It's an additional security layer, which is used for a number of services.  In short you'll have to run the following command in the user's home directory.

chcon -R -t httpd_sys_content_t public_html 

See the document at www.linuxhomenetworking.com/linux-hn/apachebasic.htm

For now, I'm turing this 'SELinux' feature off, because my current standpoint is that I don't really like these kinds of 'firewall' type of security approaches.  Instead, I think server shouldn't be able to access unwanted files in the first place.  I'll have to revisit the SELinux issue later.

(C) Copyright 2004-2007 Mike Pot