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

run --workdir=/nonesuch: chdir: No such file or directory: OCI runtime command not found error #5084

Closed
edsantiago opened this issue Feb 4, 2020 · 7 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@edsantiago
Copy link
Member

# podman run --workdir=/nonesuch alpine pwd
Error: chdir: No such file or directory: OCI runtime command not found error
# echo $?
127
(expected: "/nonesuch" and exit 0)

This is a change in longstanding behavior. I don't know what the correct behavior should be for this case, but it is a difference from docker and from all versions of podman up to now.

podman-1.8.0-0.1.fc31.x86_64
conmon-2.0.10-2.fc31.x86_64

Curiously, I cannot reproduce with podman @ master on f30.

@mheon
Copy link
Member

mheon commented Feb 4, 2020

Could this be runc vs crun?

@mheon
Copy link
Member

mheon commented Feb 4, 2020

Also, expected behavior is that the workdir will be created?

@edsantiago
Copy link
Member Author

Oh, good call: it could very well be crun. Yes, expected behavior is to create the directory:

f30# podman run -it --workdir=/none/such alpine sh
/none/such # touch abc
/none/such # ls -l /none/such/abc
-rw-r--r--    1 root     root             0 Feb  4 17:56 /none/such/abc
/none/such #

@mheon
Copy link
Member

mheon commented Feb 4, 2020

@giuseppe PTAL

@mheon mheon added kind/bug Categorizes issue or PR as related to a bug. OCI labels Feb 4, 2020
@rhatdan
Copy link
Member

rhatdan commented Feb 4, 2020

Yuck, I don't like the default. Basically this ends up with typos creating directories in the container...

@giuseppe
Copy link
Member

giuseppe commented Feb 5, 2020

yes this is a crun vs runc difference.

I can easily change it in crun if we agree on what behaviour makes more sense.

I agree with Dan and I think that chdir'ing to a not existing one should raise an error rather than creating it automatically

@rhatdan
Copy link
Member

rhatdan commented Feb 5, 2020

I am closing this since, I see this as a Bug in runc/docker, not something we should fix.

@rhatdan rhatdan closed this as completed Feb 5, 2020
kelvinfan001 added a commit to kelvinfan001/console-login-helper-messages that referenced this issue Jul 31, 2020
The `crun` runtime does not create a directory when `chdir`ing to
a non-existent directory.
containers/podman#5084
kelvinfan001 added a commit to kelvinfan001/console-login-helper-messages that referenced this issue Jul 31, 2020
The `crun` runtime does not create a directory when `chdir`ing to
a non-existent directory. containers/podman#5084
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

4 participants