S
S
Sergey Khlopov2020-11-12 10:53:21
Laravel
Sergey Khlopov, 2020-11-12 10:53:21

Are you editing Permissions for the disk in the filesystems.php config?

Hello, the web server is installed: nginx + php-fpm. I strive to ensure that the project folders have rights - 775 and files - 664. After setting up the php-fpm configs, it seems like I did that the site scripts create folders with rights 775 and files with 664, except for Storage, it creates folders with rights 755 and files with permissions 644, as I understand it, because of this setting for disks Permissions , now my disk config looks like this:

'public' => [
  'driver' => 'local',
  'root' => storage_path('app/public'),
  'url' => env('APP_URL').'/storage',
  'visibility' => 'public',
  'permissions' => [
    'file' => [
      'public' => 0664,
      'private' => 0600,
    ],
    'dir' => [
      'public' => 0775,
      'private' => 0700,
    ],
  ],
],

And the question is, is it right to do this at all? And to chase that the rights on the packs are 775 and on the files 664. But it just seems to me that these rights are right for me, because there is an ftp user who belongs to the project file owner group, and he needs to be given write permissions to the folders and file, these rights provide this opportunity.

Thank you in advance for your response.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Yuriev, 2020-11-12
@Shlop

775/664 - for directories/files read/write permissions for the user and group, read permissions for the rest
700/600 - only read/write for the user
you need to change or not - only you know

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question