master
artemdolgiy 2021-10-09 16:45:46 +03:00
parent bc817a75da
commit 96f7d7c8fb
2 changed files with 48 additions and 2 deletions

View File

@ -7,7 +7,7 @@
3. [Управление локальными пользователями и группами.](#chapter3)
4. [Управление доступом к файлам.](#chapter4)
5. [](#chapter5)
5. [Настройка SELinux.](#chapter5)
6. [](#chapter6)
7. [](#chapter7)
8. [](#chapter8)
@ -51,6 +51,19 @@
7. Проверить, что члены группы `techdocs` (`tech1`, `tech2`) теперь могут создавать и редактировать файлы в директории `/home/techdocs`.
8. Изменить глобальный скрипт загрузки. Обычные пользователи должны иметь umask при которой другие пользователи не смогут просматривать и изменять новые файлы и каталоги.
[вверх](#top)
***
###### Chapter5
**Настройка SELinux.**
1. На server1 запустить браузер и ввести адрес `http://server2/lab.html`. Отобразится сообщение `Forbidden You don't have permission to access this resource.`
2. Изучите и определите проблему SELinux, которая не позволяет Apache обслуживать веб-контент.
3. Display the SELinux context of the new HTTP document root and the original HTTP document root. Resolve the SELinux issue preventing Apache from serving web content.
5. Verify that the SELinux issue has been resolved and Apache is able to serve web content.
# В ДОКУМЕНТЕ С ОТВЕТАМИ НЕОБХОДИМО ПРЕДУСМОТРЕТЬ КОМАНДЫ ПРОВЕРЯЮЩИЕ ПРАВИЛЬНОСТЬ ВЫПОЛНЕНИЯ ЗАДАНИЙ
[вверх](#top)

View File

@ -17,7 +17,13 @@ root password: redhat
Дополнительно необходимо:
*SERVER1*
1. Установить httpd
1. Прописать доменное имя server2
```bash
[student@server2 ~]$ sudo -i
[sudo] пароль для student:
[root@server2 ~]# echo '192.168.10.11 server2' >> /etc/hosts
```
2. Установить httpd
```bash
[student@server2 ~]$ sudo -i
[sudo] пароль для student:
@ -49,6 +55,33 @@ This is SERVER2 WEB-SERVER
</body></html>
```
Перечень необходимых команд root (*стоит это оформить в виде скрипта*)
```bash
echo '192.168.10.11 server2' >> /etc/hosts
yum install httpd -y
systemctl enable --now httpd
echo "This is SERVER2 WEB-SERVER" > /var/www/html/index.html
firewall-cmd --add-service=http
firewall-cmd --add-service=http --permanent
mkdir /test
echo "This is the html file for the SELinux final lab on SERVER2." > /test/lab.html
mv /test/lab.html /var/www/html/
rmdir /test/
```
*SERVER2*
1. Прописать доменное имя server1
```bash
[student@server2 ~]$ sudo -i
[sudo] пароль для student:
[root@server2 ~]# echo '192.168.10.10 server1' >> /etc/hosts
```
Перечень необходимых команд root (*стоит это оформить в виде скрипта*)
```bash
echo '192.168.10.10 server1' >> /etc/hosts
```
***
###### top