Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

Make native filesystem directory permissions configurable to support shared POSIX ACL access

Abierto Apto para principiantes
#15,566 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
laravel, php
Área
backend

Línea de trabajo

Comienza en src/Filesystem/AbstractAdapter.php::makeDirectory(), donde el modo 0755 está codificado de forma fija, y en src/Providers/ViewServiceProvider.php::boot(), que desencadena la creación de los directorios storage/statamic/tmp/nocache durante el arranque. Añade un ajuste directory_permissions con valor predeterminado 0755 en config/statamic/system.php y léelo donde makeDirectory pasa el modo, sin tocar la configuración del escritor de páginas estáticas ni aplicar chmod a directorios existentes. Se considera terminado cuando un 0775/0770 configurado se usa para los directorios recién creados (cubierto por una prueba en el adaptador nativo) mientras el comportamiento predeterminado permanece sin cambios.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Bug description

Statamic’s native filesystem adapter creates directories with a hardcoded 0755 mode. On Linux deployments where CLI and web processes use different Unix accounts and share write access through POSIX ACLs, this restricts the inherited access ACL mask to r-x.

The named user entries are inherited, but their effective write permission is removed. This can prevent Blade nocache fragments from being written:

file_put_contents(.../storage/statamic/tmp/nocache/_nocache….blade.php):
Failed to open stream: Permission denied

The permission mechanism was reproduced locally using Statamic’s native filesystem adapter.

Relevant code

This path uses the native filesystem adapter, so Laravel disk permissions configured in config/filesystems.php do not affect it. The static page writer’s configurable permissions also do not cover these temporary Blade views.

Reproduction
Proposed change

Expose the native filesystem directory creation mode through configuration, preserving 0755 as the default for backwards compatibility.

For example, introduce a setting in config/statamic/system.php:

'directory_permissions' => 0755,

The native adapter would use that configured mode instead of the hardcoded value. Deployments using shared group or ACL access could choose 0775 or 0770.

This should affect newly created directories only, without recursively changing existing permissions or altering the separate static page writer configuration.

Expected behavior

With a configured mode of 0775 or 0770, inherited ACL write permissions remain effective for the other account, allowing CLI and web processes to share Statamic’s temporary directories.

Changing the process umask alone cannot solve this: it cannot add the group-class write bit missing from the explicitly requested 0755 mode.

How to reproduce

In a disposable application checkout:

  1. Use different Unix accounts for CLI commands and web requests.
  2. Grant both accounts write access to storage/statamic through access and default ACLs, with a default mask of rwx.
  3. Start with storage/statamic/tmp/nocache absent.
  4. Boot the application through a CLI command.
  5. Render a Blade template containing a nocache region through the web account.

Directories created by the CLI account inherit ACLs like:

user::rwx
user:web_account:rwx       #effective:r-x
group::rwx                #effective:r-x
mask::r-x
default:user:web_account:rwx
default:mask::rwx

The web account cannot create the fragment. The directory owner retains write access; the failure affects the other account accessing it through the masked ACL entries.

Restoring the access mask allows writing again:

setfacl -R -m m::rwX storage/statamic/tmp
Logs

Environment
- Statamic: 6.34.1
- Laravel: 12.69.3
Installation

Fresh statamic/statamic site via CLI

Additional details

No response

Lenguaje dominante
PHP
Estrellas
4.9k
Forks
647
Merge medio
1 d 8 h
PR fusionados (30 d)
100

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de statamic/cms

Todos los issues de statamic/cms

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.