Portál AbcLinuxu, 7. května 2025 09:58
namei -m /var/www/html/test/test33/index.php
f: /var/www/html/test/test33/index.php
drwxr-xr-x /
drwxr-xr-x var
drwxr-xr-x www
drwxr-xr-x html
drwxr-xr-x test
drwxr-xr-x test33
-rw-r--r-- index.php
v logu se píše:
AH00035: access to /test/test33 denied (filesystem path '/var/www/html/test/test33') because search permissions are missing on a component of the path
konfigurace je trivialni
VirtualHost *:80\>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Directory /var/www/html/test/test33>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Directory
VirtualHost
Instalace je debian 9. je tam nainstalovan ISP config. SELINUX podle mě ne. Poradí někdo jak to vyřešit, aby apache také viděl namountované adresáře?
tail -f /var/log/audit/audit.log chcon --user system_u --type httpd_sys_content_t -Rv /var/www/xxxxxxxxxx ls -laZ /var/www/nebo ho zkus vypnout.
tail -f /var/log/audit/audit.log
tail: cannot open '/var/log/audit/audit.log' for reading: No such file or directory
tail: no files remaining
Toto nefunguje, myslím, že selinux tam vůbec není
chcon --user system_u --type httpd_sys_content_t -Rv /var/www/html/ changing security context of '/var/www/html/test/test2' chcon: can't apply partial context to unlabeled file 'test2' changing security context of '/var/www/html/test/test33' chcon: can't apply partial context to unlabeled file 'test33' changing security context of '/var/www/html/test/test3' chcon: can't apply partial context to unlabeled file 'test3' changing security context of '/var/www/html/test' chcon: can't apply partial context to unlabeled file 'test' changing security context of '/var/www/html/index.html' chcon: can't apply partial context to unlabeled file 'index.html' changing security context of '/var/www/html/' chcon: can't apply partial context to unlabeled file '/var/www/html/'
ls -laZ /var/www/ | grep html
drwxr-xr-x 3 root root ? 4096 May 10 11:12 html
ls -laZ /var/www/html/test/
total 20
drwxr-xr-x 5 root root ? 4096 May 10 11:14 .
drwxr-xr-x 3 root root ? 4096 May 10 11:12 ..
drwxr-xr-x 2 root root ? 4096 May 10 11:12 test2
drwxr-xr-x 2 root root ? 4096 May 10 11:12 test3
drwxr-xr-x 2 root root ? 4096 May 10 11:14 test33
ls -l /var/www/html/test/
total 80
drwxr-xr-x 2 www-data www-data 4096 May 10 11:12 test2
drwxr-xr-x 2 www-data www-data 4096 May 10 11:12 test3
drwxr-xr-x 1 www-data www-data 73728 May 10 17:59 test33
test2 a test3 apaache vidi. test33 je ten namountovaný ten nevidí.
Instalace je debian 9.Debian 9 Stretch, zrejme Apache verzie 2.4.25.
VirtualHost *:80\>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Directory /var/www/html/test>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
Directory
VirtualHost
sshfs -o uid=33,gid=33 chinook@adresavzdalenehoserveru:/tmp/ /var/www/html/test1/test1/
sudo sshfs -o allow_other user@server:/dir /var/www/html/test
sudo sshfs -o allow_other,uid=33,gid=33 user@server:/dir /var/www/html/test
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.