Files permissions changing when starting DevKinsta

We are using a bedrock and sage for our WordPress website. Our application runs just fine locally, but we are experiencing all our files and folders being changed to executable when stopping and starting the dev kinsta app.

Example focusing on just 1 file:

  • Default 644 permissions for composer.json file
  • start devkinsta app
  • run git status and see composer.json (and all files) are now 755 executable

I’m running Pop!_OS Linux.

Hello @taylor-xlmedia :wave: and welcome to Kinsta Community forum!

I could replicate this behavior (DevKinsta changed all the local site’s files/folders permissions) on my Linux Ubuntu 20.04 O/S .
So first I created a new local site with DevKinsta, and when I checked, that new created local site’s folder was set to 0755 (as well as its subfolders) while its files were set to 0644 permissions.

But yeah, after I closed DevKinsta completly and re-opened it, when I checked that local site’s folders (subfolders and files), their permissions were all changed to 0777 instead. (While yours were set to 0755 on Pop!_OS Linux ?)

I’m not sure why their permission got changed like this when DevKinsta is closed and re-opened - though with this 0777 permissions for both folders/sub-folders and files, so far my local site still works just fine (I haven’t noticed any issues so far :crossed_fingers: ).

Are you experiencing any issues when your composer.json file (and any other files) permission got change to 0755 ?
If something is not working properly (after their permissions got changed to 0755), maybe as a workaround (each time after you start/open DevKinsta), you may want to perform this command line (via terminal) within the ~/DevKinsta/public/sitename folder - to manually re-set those site’s files/folder to 0755 (for folders/subfolders) and to 0644 (for files) :

find . -type d -exec chmod 755 {} ; && find . -type f -exec chmod 644 {} ;

Hope that helps (as a workaround) :pray:

Best regards,
Agus Utomo

Thanks for the quick reply @Agus

The issue is that git tracks these changes and they keep bloating our pull requests if we are not careful.

To work around this we have disabled permission tracking with Git for the project which is not ideal.

git config core.fileMode false

Hello again Taylor! :wave:

Thank you for your reply and clarification! :bowing_man:
I see that work-around you took/shared (disabling permissions tracking with Git) might not ideal :pray:

I can’t suggest any other work around either to be honest (other than the previous command line to re-set those folders to 0755 and files to 0644 ).

Well, for now I will ask question to our internal devs team, and see why DevKinsta (when it’s re-run/re-started) would change those folders and files permissions like that. Let’s see if there will be a solution for it (or a fix in the future, perhaps :person_shrugging: ) - though we can’t promise anything about it yet.

Best regards,
Agus Utomo