Skip to content

"Creating directory failed" in GitLab CI #421

@JanWennrichPCSG

Description

@JanWennrichPCSG

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions