LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   .js file with permissions 640, owned by apache user cannot be accessed thru browser (https://www.linuxquestions.org/questions/linux-server-73/js-file-with-permissions-640-owned-by-apache-user-cannot-be-accessed-thru-browser-4175428138/)

secretlydead 09-20-2012 01:10 AM

.js file with permissions 640, owned by apache user cannot be accessed thru browser
 
I have an occurrence in a web server:

- the permissions of a .js file are 640 user user
- the .js file won't be read by the web browser (403 - Permission Denied)
- .php files of the same permission can be parsed and return html
- echo exec('whoami'); in a php file echoes 'user' in the browser

So, i'm just not sure what user is grabbing the js files and why this is different from whose running the php file. I would assume if 'whoami' through php is 'user' and permissions are 640 user user, the web browser would be able to grab a .js file. Can you explain?

Thanks.

cpasqualini 09-20-2012 06:23 AM

Hi
did you tested with 644?
it would be good to have it at least working before debugging user permissions żdon't you think?

secretlydead 09-20-2012 08:07 AM

Yes, of course 644 works.

It turns out the apache user was "nobody" - any idea why 'whoami' through php returns 'user'?


All times are GMT -5. The time now is 11:41 PM.