Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
linux_wiki:configure_group-managed_content [2018/04/09 22:58] billdozor [Lab Setup] |
linux_wiki:configure_group-managed_content [2019/05/25 23:50] (current) |
||
---|---|---|---|
Line 26: | Line 26: | ||
Create directory to use | Create directory to use | ||
<code bash> | <code bash> | ||
- | mkdir / | + | mkdir / |
</ | </ | ||
\\ | \\ | ||
- | Create group that will have access to the directory to manage the content | + | Create |
<code bash> | <code bash> | ||
- | groupadd | + | useradd robert |
+ | useradd steve | ||
+ | groupadd | ||
</ | </ | ||
Line 38: | Line 40: | ||
Add users to the group | Add users to the group | ||
<code bash> | <code bash> | ||
- | usermod -G dbadmins user1 user2 | + | usermod -G developers robert |
+ | usermod -G developers steve | ||
</ | </ | ||
Line 44: | Line 47: | ||
Set permissions of new directory | Set permissions of new directory | ||
<code bash> | <code bash> | ||
- | chown :dbadmins | + | chown :developers |
- | chmod 771 / | + | chmod 771 / |
</ | </ | ||
Line 51: | Line 54: | ||
Create index file | Create index file | ||
<code bash> | <code bash> | ||
- | echo "Group dbadmins | + | echo "Developers |
</ | </ | ||
Line 58: | Line 61: | ||
====== Group Protected Setup ====== | ====== Group Protected Setup ====== | ||
- | Allow htaccess override | + | **Help**: Available if you installed ' |
+ | * Then follow the " | ||
+ | |||
+ | \\ | ||
+ | Create the groupdb file (list group members) | ||
+ | <code bash> | ||
+ | vim / | ||
+ | |||
+ | developers: robert steve | ||
+ | </ | ||
+ | |||
+ | \\ | ||
+ | Create the user entries in the userdb password file | ||
+ | <code bash> | ||
+ | htpasswd / | ||
+ | htpasswd / | ||
+ | htpasswd / | ||
+ | </ | ||
+ | * Prompted for password each time | ||
+ | * Give ' | ||
+ | * No " | ||
+ | |||
+ | \\ | ||
+ | Edit the vhosts.conf and add a directory auth section | ||
<code bash> | <code bash> | ||
vim / | vim / | ||
Line 67: | Line 93: | ||
# | # | ||
- | < | + | < |
AuthType Basic | AuthType Basic | ||
AuthName "Group Auth - Enter Credentials" | AuthName "Group Auth - Enter Credentials" | ||
AuthGroupFile "/ | AuthGroupFile "/ | ||
AuthUserFile "/ | AuthUserFile "/ | ||
- | Require group dbadmins | + | Require group developers |
</ | </ | ||
</ | </ | ||
- | + | | |
- | \\ | + | * robert and steve should be allowed in, monty should be denied. |
- | Create groupdb file | + | |
- | <code bash> | + | |
- | vim / | + | |
- | + | ||
- | dbadmins: user1 user2 | + | |
- | </ | + | |
- | + | ||
- | \\ | + | |
- | Create group password db file | + | |
- | <code bash> | + | |
- | htpasswd -c / | + | |
- | htpasswd / | + | |
- | </ | + | |
- | * Prompted for password each time | + | |
- | | + | |
- | * No "-c" the second time because it would overwrite the file instead of add to it. | + | |
\\ | \\ | ||
Line 103: | Line 113: | ||
View group protected directory | View group protected directory | ||
<code bash> | <code bash> | ||
- | elink http:// | + | elinks |
</ | </ | ||
* Prompted for username/ | * Prompted for username/ |