I'm trying to apply permissions of 600
to certain files on my web server, but they are still accessible to the world (I can access them by navigating to direct link in browser e.g. domain.com/test.txt
)!
The owner of these files is www-data:www-data
. Even when I set permissions to 000
, the files are still accessible to the world (akin to permissions 777
)!
The only way I can make files inaccessible to the world is to apply chown root:root
these files, but then www-data
can't access them!
How can I make Nginx respect file permissions?
I'm using Nginx 1.8.1 and PHP 5.6.17.