When executing phive install in GitLab CI as a non-root user, a "creating directory failed" error occurs.
You can see an example here: https://dev.quiqqer.com/quiqqer/quiqqer/-/jobs/6108
I tried to debug this and came to the following conclusion:
- the repository/project is automatically cloned by GitLab CI with the
root user as the owner and chmod 666 (see example)
- the user executing
phive install is www-data (see example)
- if the
phive.xml already exists, the method PharIo\FileSystem\Directory->ensureExists() tries to chmod the project directory (see code)
- as the executing user is
www-data and thus does not own the project directory, the chmod fails due to lack of permission
Am I doing something wrong or is this a bug?
Is PHIVE even meant to be used in CI to install tooling?
Is it correct to use the phive.xml file or should I use a different file for that?
When executing
phive installin GitLab CI as a non-root user, a "creating directory failed" error occurs.You can see an example here: https://dev.quiqqer.com/quiqqer/quiqqer/-/jobs/6108
I tried to debug this and came to the following conclusion:
rootuser as the owner andchmod 666(see example)phive installiswww-data(see example)phive.xmlalready exists, the methodPharIo\FileSystem\Directory->ensureExists()tries tochmodthe project directory (see code)www-dataand thus does not own the project directory, thechmodfails due to lack of permissionAm I doing something wrong or is this a bug?
Is PHIVE even meant to be used in CI to install tooling?
Is it correct to use the
phive.xmlfile or should I use a different file for that?