Key file permissions are not correct, should be 600 or 660 instead of 644 How can I solve this?
14 Answers
As @avigil and @IliaRostovtsev mentioned on their answers. You have to change the file permisions to 600 or 660 with this instruction:
chmod 600 /filepath or
chmod 660 /filepath Why 600 or 660 instead of 644 permissions? Becase:
644 permission means: I (owner) can change it, everyone else can read it.
600 permission means: I (owner) can write and read the file, everyone else can't.
660 permission means: I (owner) can write and read the file. Group members can write and read the file. Everyone else not mentioned above can't.
600 and 660 permissions will add an extra level of security to your files because you won't let "everyone" to read or write on your files
If you have Windows and have trouble with laravel you can check these 2 links which fix this problem:
7Setting needed permissions by running in the console on the required file:
chmod 600 /path/to/the/file 4Set proper permissions with chmod 600 /path/to/your/keyfile
You should be able to just do: sudo chmod 660 filename