You are not logged in.

#1 2019-06-22 17:35:42

Tron0070
Member
Registered: 2019-06-22
Posts: 1

are my apache rights correctly?

Hi guys, I am new at this forum and new at Arch Linux.

I just want to know, are my apache rights correctly, securely and protected for possible attacks?

sudo pacman -S apache
sudo pacman -S php php-apache

sudo nano /etc/group
# I change
http:x:33:
# to: 
http:x:33:vtron

sudo chown -R http:http /srv/http/
sudo find /srv/http -type d -exec chmod g+s {} +
sudo find /srv/http -type d -exec chmod 775 '{}' \;
sudo find /srv/http -type f -exec chmod 664 '{}' \;

And the /etc/httpd/conf/httpd.conf is:

sudo nano +66 /etc/httpd/conf/httpd.conf
#LoadModule mpm_event_module modules/mod_mpm_event.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so

## add to the end of file
LoadModule      php7_module             modules/libphp7.so
AddHandler      php7-script             .php
Include         conf/extra/php7_module.conf
php_admin_flag safe_mode Off
php_admin_value open_basedir none

Output rights from folders and files

[vtron@vServer ~]$ ls -la --full-time /srv/
insgesamt 16
drwxr-xr-x  4 root root 4096 2019-01-07 14:43:12.399999987 +0100 .
drwxr-xr-x 17 root root 4096 2019-06-21 05:26:07.456666652 +0200 ..
dr-xr-xr-x  2 root ftp  4096 2018-12-06 15:19:24.000000000 +0100 ftp
drwxrwsr-x  3 http http 4096 2019-06-22 19:09:13.886666338 +0200 http


[vtron@vServer ~]$ ls -la --full-time /srv/http/
insgesamt 28
drwxrwsr-x 3 http  http 4096 2019-06-22 19:09:13.886666338 +0200 .
drwxr-xr-x 4 root  root 4096 2019-01-07 14:43:12.399999987 +0100 ..
-rw-rw-r-- 1 vtron http    4 2019-06-22 18:08:54.139999900 +0200 index.html
-rw-rw-r-- 1 http  http   22 2019-06-22 11:02:30.383331911 +0200 info.php
-rw-rw-r-- 1 http  http    0 2019-06-22 11:24:36.946665191 +0200 lk
-rw-r--r-- 1 vtron http    6 2019-06-22 18:23:35.363333152 +0200 test2.html
-rw-r--r-- 1 vtron http    0 2019-06-22 18:38:03.096666440 +0200 test5.html
-rw-r--r-- 1 vtron http    0 2019-06-22 19:05:28.899999681 +0200 test6.html
drwxr-sr-x 2 vtron http 4096 2019-06-22 19:09:13.886666338 +0200 test_folder_1
-rw-r--r-- 1 vtron http   58 2019-06-22 18:20:15.246666498 +0200 test.html

Sysinfo

vtron@vServer
OS: Arch Linux 
Kernel: x86_64 Linux 5.1.12-arch1-1-ARCH
Uptime: 1h 35m
Packages: 236
Shell: bash 5.0.7
CPU: QEMU Virtual version 2.5+ @ 2.4GHz
GPU: cirrusdrmfb
RAM: 58MiB / 1992MiB

Did I forgot something?

Greetings
  Tron

Offline

#2 2019-06-22 21:09:06

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 630

Re: are my apache rights correctly?

Offline

Board footer

Powered by FluxBB