mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[GH-ISSUE #935] Issue: mkdir: cannot create directory '/var/run/act/actions': Permission denied #552
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#552
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @justinlevi on GitHub (Dec 21, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/935
System information
act: ubuntu-latestactversion: act version 0.2.25Expected behaviour
I expect the tests to pass as they do on github
Actual behaviour
Failure - mkdir cannot create directory
/var/run/act/actionsWorkflow
workflow
Steps to reproduce
actoutputLog
@justinlevi commented on GitHub (Dec 21, 2021):
I'm very new to github actions and ACT so I'm likely missing something obvious. This is my "hello world" attempt at getting things working locally. All tests pass if I run them directly and everything works as expected on Github actions. I'm unsure why this workflow wouldn't work with act though?
@bendizen commented on GitHub (Dec 22, 2021):
I have the same issue
@catthehacker commented on GitHub (Dec 22, 2021):
Duplicate of #398
@bendizen commented on GitHub (Dec 22, 2021):
Downgrading to act 0.2.24 fixed it for me.
@github-actions[bot] commented on GitHub (Jan 22, 2022):
Issue is stale and will be closed in 14 days unless there is new activity
@jessepinuelas commented on GitHub (Feb 9, 2022):
@catthehacker Still running into this error:
mkdir: cannot create directory '/var/run/act/actions': Permission deniedI added - run: sudo chown runner:docker /var/run/docker.sock to my steps in workflow am I missing something here?
@bendizen commented on GitHub (Feb 10, 2022):
@jessepinuelas this is how I downgraded it:
@agravelot commented on GitHub (Feb 17, 2022):
Adding
--rebuildflag seems to fix the issue for me.@mattjennings commented on GitHub (Feb 17, 2022):
--rebuilddid not work for me, but downgrading to 0.2.24 per steps from @bendizen did.@drewyangdev commented on GitHub (Feb 24, 2022):
act -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:act-latestat first, but later I need to usedocker-composewhich doesn't come with the Medium, so trying out with the Large image. The Large imageact -P ubuntu-latest=ghcr.io/catthehacker/ubuntu:full-latestdoes come withdocker-compose, but I'm having the same issueThis issue isn't there by using the alternative Large image
act -P ubuntu-latest=nektos/act-environments-ubuntu:18.04, anddocker-composeworks as well. However, it's building super slow while runningapt-get update.I'll extend the Medium image by myself then...😭
@Nuru commented on GitHub (Mar 10, 2022):
@catthehacker, what makes you think this is a duplicate of https://github.com/nektos/act/issues/398 ? The problem here is that somehow permissions on
/var/run/actsomehow go fromto
so that
usercannot create/var/run/act/actionsThe problem in 398 is that
useris not root and not the user owning the files in the workdir.@catthehacker commented on GitHub (Mar 10, 2022):
@ChristopherHX commented on GitHub (Mar 27, 2022):
I'm reopen this, because this problem is caused by
github.com/nektos/act@c4db165d2d/cmd/root.go (L422)and the USER directive of these images.No custom images are in use, you just need to select large in the first prompt of act to select an image.
Possible Workaround for act
v0.2.25/26Change the USER back to root of the large images.
You can alter the full images by creating a dockerfile and build the image
Dockerfile
Then run
docker build . -t ghcr.io/catthehacker/ubuntu:full-20.04, don't specify the-p, --pulloption of act or the change is reverted.Repeat it for all large image you want to use.
@ahonnecke commented on GitHub (Apr 19, 2022):
@ChristopherHX I would very much like to be able to use this tool; I have this failure reproduced locally and would be happy to test a PR if and when one becomes available.
@anoushk1234 commented on GitHub (May 6, 2022):
you must also unpin act otherwise it might not downgraded
@github-actions[bot] commented on GitHub (Jun 6, 2022):
Issue is stale and will be closed in 14 days unless there is new activity
@Nuru commented on GitHub (Jun 6, 2022):
@ChristopherHX What is your current recommendation to work around this issue while waiting for a fix?
@ChristopherHX commented on GitHub (Jun 6, 2022):
Replace the user of the docker image with root ( uid 0 ): https://github.com/nektos/act/issues/935#issuecomment-1079940018
I saw new duplicated reports, this might really needs a fix in v0.2.27-dev.
This could be fixed by either
rootuser and ignore the user of the image( This issue could be closed as duplicate, if the non root user is removed from the first time setup images. Requires fixes of .actrc or docker pull on all affected devices )@Ian1971 commented on GitHub (Jun 15, 2022):
what is curious for me is that I only get this if I do not have a checkout step or set the flag --no-skip-checkout. i.e. the fake checkout it does seems to get around this permission issue.
@AdamSmithJuniperEducation commented on GitHub (Jun 15, 2022):
I was using the large size image and was recieving this error. I cleared out the ~/.actrc file and ran act again. I was presented with the select image size options. I selected medium and everything worked as expected.
@Ian1971 commented on GitHub (Jun 15, 2022):
hmmm ok, will give it a try. I switched to the large size image because something else wouldn't work (dotnet maybe)
@Ian1971 commented on GitHub (Jun 15, 2022):
So you are right the medium image doesn't have the permission issue. Sadly for me though that fails on actions/setup-dotnet@v2
@AdamSmithJuniperEducation commented on GitHub (Jun 16, 2022):
What error do you get @Ian1971? I am using setup-dontnet@v2 and it works fine. My snippet is below:
@Ian1971 commented on GitHub (Jun 16, 2022):
Ah actually it was a different step, I saw dotnet and assumed that was it. The error is actually this
(where ${{ inputs.netversion }}=6.0.x
so I'll dig in to that action some more. Works on github though
@AdamSmithJuniperEducation commented on GitHub (Jun 16, 2022):
Do you have the below in your steps with the appropriate .NET version before that step in your GitHub Workflow file?
Looks like the step cannot find the dotnet SDK from the line
::error::Unable to locate executable file: dotnet. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.@Ian1971 commented on GitHub (Jun 16, 2022):
Yes it looks like this
@andylamp commented on GitHub (Jun 17, 2022):
The issue still exists in Ubuntu Linux hosts using
actversion0.2.26...@catthehacker commented on GitHub (Jun 17, 2022):
I re-pushed the images with default user being root
@andylamp commented on GitHub (Jun 17, 2022):
@catthehacker - thanks! will try tomorrow and report back.
@andylamp commented on GitHub (Jun 19, 2022):
The updated images seem to work as expected.
@PhilippWillms commented on GitHub (Jul 31, 2022):
This issue is still occurring at my end. I am using the following:
@ChristopherHX commented on GitHub (Jul 31, 2022):
@PhilippWillms Please open a new issue, including a verbose log of your error.
This issue is about:
I removed calling mkdir from act, therefore it should be impossible that you experience the same issue. The docker image you have mentioned has never caused this issue.