AdguardTeam / AdguardTeam/AdGuardHome

Strict file mode (permissions) setting?

Abierto
#3,200 4 comentarios 5 reacciones 1 asignado Reclamado por @ainar-g Ver en GitHub
enhancement P3: Medium
Lenguaje dominante
TypeScript
Estrellas
36.9k
Forks
2.5k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

Currently, AGH creates most of its files and directories with permissions like `0o644` (`-rw-r--r--`) for non-executable files and `0o755` (`-rwxr-xr-x`) for executables and directories. CWE and securego.io recommend these to be no greater than `0o600` (`-rw-------`) and `0o750` (`-rwxr-x---`) correspondingly.

I propose that we add a setting, `strict_file_mode`, which makes AGH make these `0o600` and `0o750`/`0o700`. I would like it to be set to `true` by default, but that could break people's backup and other scripts. Perhaps it should only be `true` for new installations?

@ameshkov, what do you think?

Related:

* #764.
* #3198.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.