linux_wiki:configure_group-managed_content

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:configure_group-managed_content [2018/04/09 23:10]
billdozor [Group Protected Setup]
linux_wiki:configure_group-managed_content [2019/05/25 23:50] (current)
Line 48: Line 48:
 <code bash> <code bash>
 chown :developers /data/redsite/devel-group chown :developers /data/redsite/devel-group
-chmod 771 /data/redsite/group+chmod 771 /data/redsite/devel-group
 </code> </code>
  
Line 61: Line 61:
 ====== Group Protected Setup ====== ====== Group Protected Setup ======
  
-Edit the vhosts.conf and add a directory auth section for the new devel-group directory +**Help**: Available if you installed 'httpd-manual'<code bash>elinks /usr/share/httpd/manual/howto/auth.html</code
-<code bash> +  * Then follow the "Letting more than one person inlink
-vim /etc/httpd/conf.d/vhosts.conf +
- +
-<VirtualHost *:80> +
-  ServerName redsite.example.com +
-  DocumentRoot /data/redsite +
-  #....SNIP....# +
- +
-  <Directory /data/redsite/devel-group+
-    AuthType Basic +
-    AuthName "Group Auth - Enter Credentials" +
-    AuthGroupFile "/etc/httpd/conf/groupdb" +
-    AuthUserFile "/etc/httpd/conf/userdb" +
-    Require group developers +
-  </Directory> +
-</code>+
  
 \\ \\
Line 92: Line 77:
 htpasswd /etc/httpd/conf/userdb robert htpasswd /etc/httpd/conf/userdb robert
 htpasswd /etc/httpd/conf/userdb steve htpasswd /etc/httpd/conf/userdb steve
 +htpasswd /etc/httpd/conf/userdb monty
 </code> </code>
   * Prompted for password each time   * Prompted for password each time
   * Give 'htpasswd' the -c argument if the userdb file does not exist to create it.   * Give 'htpasswd' the -c argument if the userdb file does not exist to create it.
     * No "-c" the second time because it would overwrite the file instead of add to it.     * No "-c" the second time because it would overwrite the file instead of add to it.
 +
 +\\
 +Edit the vhosts.conf and add a directory auth section for the new devel-group directory
 +<code bash>
 +vim /etc/httpd/conf.d/vhosts.conf
 +
 +<VirtualHost *:80>
 +  ServerName redsite.example.com
 +  DocumentRoot /data/redsite
 +  #....SNIP....#
 +
 +  <Directory /data/redsite/devel-group>
 +    AuthType Basic
 +    AuthName "Group Auth - Enter Credentials"
 +    AuthGroupFile "/etc/httpd/conf/groupdb"
 +    AuthUserFile "/etc/httpd/conf/userdb"
 +    Require group developers
 +  </Directory>
 +</code>
 +  * Now only users in the userdb file AND in the "developers" group are allowed to view the content.
 +    * robert and steve should be allowed in, monty should be denied.
  
 \\ \\
Line 106: Line 113:
 View group protected directory View group protected directory
 <code bash> <code bash>
-elink http://redsite.example.com/devel-group+elinks http://redsite.example.com/devel-group
 </code> </code>
   * Prompted for username/password   * Prompted for username/password
  • linux_wiki/configure_group-managed_content.1523329806.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)