Creating a new git Repository with Diffusion fails (permissions)

Hello all,
when I try to activate a new git repository in Diffusion it fails with this Error:

	Pull of 'reponame' failed: Command failed with error #128! COMMAND git init --bare -- /var/repo/1 STDOUT (empty) STDERR fatal: cannot mkdir /var/repo/1: Permission denied 

Some basic information:
My VCS user is ‘git’
My daemon user is ‘phabricator-daemon’

Now when I look at my /var/repo folder it has these permissions

drw-rw-rw-  2 phabricator-daemon phabricator-daemon 4096 May 25 21:58 repo

This old forum post (https://secure.phabricator.com/T9048) says that the /var/repo/ directory needs to be owned by the daemon user, which it is.
I have also tried with different groups and owners.
I don’t see why it fails with missing permissions when the folder is read and write for all users and groups, and the daemon users

Thanks in advance,
-Jade.

Some addition information:
Phabricator is running un Ubuntu 18.04 served via Apache2.
The DB Server is MySQL with Version 14.14 Distrib 5.7.30.
The PHP version is 7.2.24-0ubuntu0.18.04.4.

Update: I am very confused, on the server I used su to test all the accounts and the vcs user, www-data and phabricator can make directories in /var/repo.

  1. Are you sure the daemon is actually running as daemon-user?
  2. Do you have SELinux or AppArmor installed?