A
A
admin-baton2016-04-26 14:47:52
linux
admin-baton, 2016-04-26 14:47:52

Why can't www-data read /usr/share?

I want to fill one gap in my *nix knowledge, but I don't even know what to google.
The essence of my gap in one question:
There is a directory /usr/share , the owner and group are root , the rights are standard, i.e. 755 for directories and 644 for files. These rights ALLOW to read, namely to read files and folders to any user of the system.
There is one Apache in conjunction with PHP, which runs under the www-data user . And he... IS FORBIDDEN to access the /usr/share directory! Tellingly, the same phpMyAdmin from /usr/share/phpmyadmin runs under the www-data user, and everything is readable!
WHY?! Clarify please! Or poke into the correct manuals explaining this alignment.
Why do I need it: I want to make a directory in which common php libraries will be stored, for inclusion from any virtual host, in read-only mode.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
S
Slava Kryvel, 2016-04-26
@kryvel

How did you determine that he was denied access?

O
oldbro, 2016-04-26
@oldbro

Perhaps directly in the Apache settings is prohibited.
See /etc/apache/apache2.conf (or whatever distribution you have) in the block

<Directory /usr/share>
.....
</Directory>

Y
Yuri Chudnovsky, 2016-04-26
@Frankenstine

is_readable only checks if it is possible to get file_get_contents() and the like, therefore, in case of a 403 response, the function will return FALSE, even if the directory is readable, Options -Indexes or another similar prohibition in the config just worked.

E
Eugene, 2015-05-09
@yellowmew

your problem

sudo gedit /etc/modprobe.d/asus.conf
A text file will open. Add a line to the end there.
options asus_nb_wmi wapf=4
Save the file and reboot. Should work.

Subscribe if it helped

G
gitdev, 2020-09-27
@gitdev

I had the same problem, solved by reinstalling the wifi driver:
https://www.youtube.com/watch?v=417_bHHpDso

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question