问题原文
原帖链接 · Axel Werner · CC BY-SA 3.0
im sure, this question looks really stupid first. but i need a "second opinion" on this, even i did some research on my own but i am still unsure about this.
By default the Apache Configuration on CentOS7 and pretty much any Distro i know so far usually denies access recursively to the ROOT Filesystem (/) with a Directory Statement like this:
Default: /etc/httpd/conf/httpd.conf
<Directory />
AllowOverride none
Require all denied
</Directory>
Usually Followed by some Directory Statements (Blocks) that "relaxes" Permissions to the parts of the filesystem that contain html or other web server content.
Now i have to deal with "some Web App" from "some Company" lately that is requesting/requiring the following Change to the apache config file:
Requested by Software Company: /etc/httpd/conf/httpd.conf
<Directory />
AllowOverride none
Require all granted
</Directory>
This raised some red flag inside my mind and i tried to research this on the net. not yet found anything stating clearly what this configuration would effectively mean. But i would guess, this grants read access to pretty much any file on the whole Linux Server which can be read by usergroup "other" or the apache service account or service group. So if i am right, it would be a really really baaaaaad idea to ever do something like this on an internet webserver.
am i correct on this assumption? or am i missing something here?
thanks for any hint/tip/explaination on this!
best regards Axel
已采纳解答
原帖链接 · Matthew Haeck · CC BY-SA 4.0
This is an issue I've ran into a few times & it stems from a change in terminology from Apache 2.2 to Apache 2.4 (detailed here). Access control options that were previously addressed with 'Order X, Allow or Deny from X', can now be managed with 'Require X'. The simplest use case example would be...
Apache 2.2:
Order allow,deny
Allow from all
..on the more recent Apache would equate to...
Apache 2.4:
Require all granted
So basically, Yes - you are correct to assume that this change extensively losens access privledges on your server (holding all else equal of course).
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
