Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: adjust file permissions in case the symfony dev server is starte… #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philipreinken
Copy link
Contributor

…d as root


We've got failing builds due to permission errros like this one:

"errors": [
    {
      "status": "400",
      "code": "THEME__COMPILING_ERROR",
      "title": "Bad Request",
      "meta": {
        "parameters": {
          "themeName": "Storefront",
          "message": "Unable to set visibility for file theme-variables.scss. chmod(): Operation not permitted"
        }
      },
      "trace": [
...

I think this is due to the symfony dev server dropping privileges automatically when being run as root: https://github.com/symfony-cli/symfony-cli/blob/main/local/php/fpm.go#L41-L51

This PR adds similar logic to our workflow to set the file permissions accordingly.

@philipreinken philipreinken self-assigned this Nov 6, 2024
@shyim
Copy link
Member

shyim commented Nov 6, 2024

why is the image running as root?

@philipreinken
Copy link
Contributor Author

philipreinken commented Nov 6, 2024

why is the image running as root?

We've just been using the defaults of the catthehacker/ubuntu image. Thanks for the hint, I think we could circumvent it as well by providing the corresponding options to the container config. I'll try that out.

@philipreinken
Copy link
Contributor Author

The shivammathur/setup-php action requires root privileges to interact with apt and install various packages. So I don't see an easy way around it at the moment 🤔

@philipreinken philipreinken marked this pull request as ready for review November 6, 2024 18:28
@shyim
Copy link
Member

shyim commented Nov 6, 2024

isn't it just calling sudo?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants