chmod user permissions
chmod, permissions
Solution
It is the web server process user (e.g. the user running Apache or whatever) for which permission checks are applied.
Presumably the web server user owns the files being served.
People visiting your website are not "users" of the system at all, in the sense of file system security. Rather, the web server process runs as a user of the system and serves up HTML on behalf of people requesting it.
UPDATE
Regarding your comment about the differences between 400, 700 and 755:
- Only the first digit matters if the process running the web server owns the file being served
- That means we really care about the difference between 4xx and 7xx
- Refer to the following table to understand what the "4" and the "7" mean
Permission Table
Nr Permission rwx
7 full 111
6 read and write 110
5 read and execute 101
4 read only 100
3 write and execute 011
2 write only 010
1 execute only 001
0 none 000
http://en.wikipedia.org/wiki/Chmod
Note that a "4" gives read access to the file owner and 7 gives full access (which includes read access).
Problem
I have a question regarding regarding the permissions. I believe that the 3 marks stand for owner group all. So I think that any user who will view my page will be the 3rth mark in the chmod command. However when I set a file to 700 which should be owner - all / group nothing / world-nothing. everyone can still see the file when they open the website. But when i set the permissions to 000 the file no longer opens so Im wondering how the permissions work. Thanks