Skip to content

Commit

Permalink
Fix file permissions for caches (#1573)
Browse files Browse the repository at this point in the history
  • Loading branch information
nagmat84 committed Oct 28, 2022
1 parent 6c1a304 commit 407c29b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions bootstrap/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@

ini_set('user_agent', 'Lychee/4 (https://lycheeorg.github.io/)');

/*
* Ensure that the umask does not deny any user or group permissions,
* but honor the system-provided setting for world.
*
* The recommended setup is to run the web server within a security context
* with its own owner and group, e.g. let's say `apache:www-data`.
* An web admin user for CLI operations is supposed to be a member of the
* group of the web server, e.g. `www-data` in the example above.
* (Note, such an admin is not necessarily root).
* Objects inside file-based caches (like the one below ./storage) must be
* created group-writable.
* Otherwise, the web admin cannot successfully clear the cache after an
* upgrade (or run commands such as `./artisan optimize:clear` manually).
*/
\umask(0007 & umask());

/*
|--------------------------------------------------------------------------
| Create The Application
Expand Down

0 comments on commit 407c29b

Please sign in to comment.