Should my file permissions for my root web directory /var/www/html be 775 or 770?
As pessoas normalmente usam 775.
With the 'others' setting set at 0, this means that outsiders shouldn't be able to read, write, cd into the directory or delete anything, but I can still access the website via my browser. Is this because apache is listening for the http request and accessing the directory itself?
Não. Porque quando você acessa o site via navegador, você está fazendo um efeito nesse diretório sob os privilégios de usuário apache
.
If this is the case, what is setting this to 0 stopping people doing? Is this mainly to stop people using ssh to read the contents of a directory? Is there any reason I should have the 'others' flag set at 5 for directories?
Sim, outros usuários não podem acessar o diretório ( cd
) e listar o conteúdo ( ls
).