Hello,
I have a problem with permissions for Spatie Media Library.
The application runs in a docker container.
I have defined the MEDIA_DISK=media with this configuration.
'media' => [
'driver' => 'local',
'root' => storage_path('app/media'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
],
The library creates the main folder for the image without any problem. So I have : storage/app/media/6. Then it creates the original image without any problem, so I have : storage/app/media/6/image.jpg. Then it fails when executing mkdir() to create the conversions folder.
The 6 folder is created with 755 permissions.
To check is something would change, I have modified the permissions in the filesystem configuration file.
'media' => [
'driver' => 'local',
'root' => storage_path('app/media'),
'url' => env('APP_URL').'/storage',
'permissions' => [
'file' => [
'public' => 0655,
'private' => 0655,
],
'dir' => [
'public' => 0777,
'private' => 0777,
],
],
'throw' => false,
],
But it doesn't work better, the mkdir() command still fails.
Does Spatie Media Library apply some specific permissions ? If yes, do you know if it's possible to configurate these permissions ? I don't have seen anything about folder / file permissions in the library documentation.
Do you have any idea why it fails ? nginx configuration ? laravel filesystem configuration ? docker configuration ? ... ?
Thanks a lot for your help.
V