Hi,
I’m using Plesk to host an October CMS website. Plesk uses 750 as the default folder mask. I’ve changed it in .env to DEFAULT_FOLDER_MASK=750, but when I try to upload a file in the Media, it still tries to use 755 as a folder mask:
Permission denied: storage/temp/public/ab1/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable…etc etc.
How can I make sure October CMS uses the DEFAULT_FOLDER_MASK that’s defined in the .env file?
Hi and welcome @mlieshout,
When using October v3 and onwards, these permissions are indeed applied to the media disk automatically using these config keys:
filesystems.disks.local.permissions.file.public
filesystems.disks.local.permissions.dir.public
Alternatively, and in older versions, you can set these config values yourself manually. See the Laravel docs for more information: File Storage - Laravel - The PHP Framework For Web Artisans
'local' => [
'driver' => 'local',
// ...
'permissions' => [
'file' => [
'public' => 0644,
'private' => 0600,
],
'dir' => [
'public' => 0755,
'private' => 0700,
],
],
],
I hope this helps.
Hi,
Yes, this works perfectly.
Thanks!
1 Like
@daftspunk Hi Sam. Why default is 777 (october 1) and not 755/644?
These defaults were for shared environments that use other protection methods like suPHP. Since moving to composer they are no longer used by default.