Solved Git sets permission to read only instead of read & execute

Daniel_Dog

Verified User
Joined
Nov 16, 2019
Messages
452
Hello everyone,

I am currently trying to setup a new Git repo (in "Advanced > Git") so that I can auto update my site when I push an update to the repo.
When I fetch & deploy then all files get read only permission.
This is a problem because .htaccess and .php files need read & execute to work. (Otherwise I get a 403 error page and see in the site log it is missing the correct permissions.)

The weird thing is that I did the same thing a couple of months ago for my dev site (but on the same DA install) and all the files got read and execute permission so it works without issue.

I have fixed it for now by just setting all the files to read and execute but I am worried this is going to create issues again when I add new files to the repo since Git (not GIT itself but the feature Git in DA) does not set the correct permission.
 
After some more testing it seems like a issue with my setup.
When I created the sub domain for the repo, it failed due to errors with my multi server DNS setup. (But manage to get it working in the end.)
This likely caused all the mentioned above.

I am suspecting that the issues what doe to DirectAdmin not correctly cleaning up after itself.
But the 644 read only files are fine and allow PHP to work.
So in the end the problem sorted itself out.
 
The multi server error was due to a segmentation fault.
I manage to trace it back to a DNS/NS issue.

On my bare metal server in DE I use 1.1.1.1 and not my hosters own IPs for DNS, but on my UK server I use my hosters DNS IPs. (Since it is a VPS with networking configured via cloud-init and thus near inpossible to change.)
When the segmentation fault happend, the UK DNS servers where down, and thus no DNS.
This had the side effect that the DirectAdmin hosts could no correctly comunicate with each other. (I use the hostnames for multi server and the UK host had no clue where the hostname for the other host resolved to.)

And I am guessing that after getting the segmentation fault, DirectAdmin did not or was not able to clean up correctly and thus resulting in this weird error.
 
Hello,

Since it is a VPS with networking configured via cloud-init and thus near inpossible to change.

You might update /etc/cloud/cloud.cfg per your needs then (i.e. remove unwanted actions from the file for example), or use Network Manager nmcli to force custom settings.
 
Back
Top