You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I generate a new page, or a new anything, I’m getting this error: “Reverted because: EACCES: permission denied, scandir”.
The new page (or the new anything) is not generated as a result.
It happens because redwood is trying to scan a directory that it doesn't have permission to read. Such a directory can be created as a result of mapping a docker volume to file system.
How do we reproduce the bug?
In a rw project root create a new directory and set permission to 000 mkdir dir && sudo chmod 000 dir
Run any rw g command, for example yarn rw g page mypage
In my exact case the directory is created by Postgres docker container
This seems to boil down to the restriction that the redwood CLI expects to be able to access all of the contents in the project, so it's breaking when you have a folder that only root can access. I don't think that this expectation of the CLI is unreasonable?
I think we would advice anyone else who runs into this issue to follow your permission fix or to have the other docker volumes (which may then raise permission issues) outside the project directory.
Thanks again for documenting the behaviour and workaround. I'm going to close this issue but feel free to reopen if you want to or if you have a suggested way forward we might not have thought about.
What's not working?
When I generate a new page, or a new anything, I’m getting this error: “Reverted because: EACCES: permission denied, scandir”.
The new page (or the new anything) is not generated as a result.
It happens because redwood is trying to scan a directory that it doesn't have permission to read. Such a directory can be created as a result of mapping a docker volume to file system.
How do we reproduce the bug?
mkdir dir && sudo chmod 000 dir
rw g
command, for exampleyarn rw g page mypage
In my exact case the directory is created by Postgres docker container
docker run -d \ --name postgres \ -e POSTGRES_PASSWORD=your_password \ -v $(pwd)/db:/var/lib/postgresql/data \ -p 5432:5432 \ postgres:latest
rw g
command, for exampleyarn rw g page mypage
What's your environment? (If it applies)
Are you interested in working on this?
The text was updated successfully, but these errors were encountered: