Wrong permission after editing Laravel .env file

Hi there,

I want to use Cleavr to run a Laravel app. After editing the .env file using the Cleavr UI, the file permissions look like this:

-rw-------  1 cleavr       cleavr       1290 Dec 29 13:06 .env

The problem is, that my application is using another user and cannot access the .env file.

Could this be a Cleavr bug?

Thanks,
Sebastian

Hello Sebestian,

We’ll look into the issue and get back to you as soon as possible.

Hello Sebestian,

We’re looking at the issue currently but in the mean time you can change the file permission manually with the following script:

chown {{ username }}:{{ username }} {{ projectPath }}/.env

chmod 0600 {{ projectPath }}/.env

You can find project path in the site details page.

I hope this helps.

Thanks, I already did that :slight_smile:

Another file with wrong permissions is: /storage/logs/laravel.log. This file has permission root:root.

The .env one was a bug and the fix is already on its way. The laravel.log one is an odd one and we weren’t able to repro it. However, we’ll keep looking into it and see what caused that and try to find some edge case bugs if any. Thanks for reporting it.

Ok, great, thank you!