Organizational Research By

Surprising Reserch Topic

Question:Grant access to a user's web directory


 

Grant access to a user's web directory: public_html

  • Enabling Red Hat / Fedora Linux, Apache public_html user directory access:

    This will allow users to serve content from their home directories under the subdirectory "/home/userid/public_html/" by accessing the URL http://hostname/~userid/

    File: /etc/httpd/conf/httpd.conf
    LoadModule userdir_module modules/mod_userdir.so
    
    ...
    ...
    
    
        #UserDir disable             - Add comment to this line
        #
        # To enable requests to /~user/ to serve the user's public_html
        # directory, remove the "UserDir disable" line above, and uncomment
        # the following line instead:
        UserDir public_html          # Uncomment this line
    
    
    ...
    ...
    
    
        AllowOverride FileInfo AuthConfig Limit
        Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
        
            Order allow,deny
            Allow from all
        
        
            Order deny,allow
            Deny from all
        
    
    
    Change to a comment (add "#" at beginning of line) from Fedora Core default UserDir disable and assign the directory public_html as a web server accessible directory.
    OR
    Assign a single user the specific ability to share their directory:
    1 <Directory /home/user1/public_html>
    2    AllowOverride None
    3    order allow,deny
    4    allow from all
    5    Options Indexes Includes FollowSymLinks
    6 Directory>
    Allows the specific user, "user1" only, the ability to serve the directory /home/user1/public_html/
    Also use SELinux command to set the security context: setsebool httpd_enable_homedirs true
asked Sep 13, 2013 in LINUX by anonymous
edited Sep 12, 2013
0 votes
25 views



Related Hot Questions



Government Jobs Opening


...