HTTP Configure Group Managed Content Flashcards

1
Q

Assuming your document root is /var/

A

mkdir /var/private
groupadd dbadmins

chgrp dbadmins /var/private

usermod -G dbadmins wemery
usermod -aG dbadmins user

chmod 771 /var/private

echo “This is the private directory index.html” > /var/private/index.html

semanage fcontext -a -t httpd_sys_content_t “/var/private(/.*)?”

restorecon -Rv /var/private

vim /etc/httpd/conf/httpd.conf

AllowOverride AuthConfig

vim /var/private/.htaccess

AuthType Basic
AuthName “Password Protected DBAMIN Content”
AuthUserFile “/etc/httpd/conf/.grouppasswodb”
AuthGroupFile “/etc/httpd/conf/.groupdb”
Require group dbadmins

vim /etc/httpd/conf/.groupdb
dbadmins: user wemery

chown :apache .groupdb
chmod 640 .groupdb

htpasswd -c .grouppasswddb user
htpasswd grouppasswddb wemery

How well did you know this?
1
Not at all
2
3
4
5
Perfectly