podman: Cannot run script from mounted volume
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Running a script that resides on a mounted vokume fails
Steps to reproduce the issue:
cat > ./example <<EOF
#!/bin/bash
echo hello
EOF
chmod +x ./example
podman run -v "$PWD:$PWD" -w "$PWD" fedora:30 ./example
podman run -v "$PWD:$PWD" -w "$PWD" fedora:30 "$PWD"/example
Describe the results you received:
Error: executable file not found in $PATH: No such file or directory: OCI runtime command not found error
/bin/bash: /home/avi/example: Permission denied
Describe the results you expected:
hello
hello
Additional information you deem important (e.g. issue happens only occasionally):
Looks like there are two bugs: first, relative paths don’t work, and second, permission is denied when running a script from a mounted volume.
Output of podman version:
podman version 1.6.1
Output of podman info --debug:
debug:
compiler: gc
git commit: ""
go version: go1.13
podman version: 1.6.1
host:
BuildahVersion: 1.11.2
CgroupVersion: v2
Conmon:
package: conmon-2.0.1-1.fc31.x86_64
path: /usr/bin/conmon
version: 'conmon version 2.0.1, commit: 5e0eadedda9508810235ab878174dca1183f4013'
Distribution:
distribution: fedora
version: "31"
MemFree: 17672916992
MemTotal: 33549914112
OCIRuntime:
package: crun-0.10.2-1.fc31.x86_64
path: /usr/bin/crun
version: |-
crun version 0.10.2
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +YAJL
SwapFree: 16869486592
SwapTotal: 16869486592
arch: amd64
cpus: 8
eventlogger: file
hostname: tmp.scylladb.com
kernel: 5.3.4-300.fc31.x86_64
os: linux
rootless: true
slirp4netns:
Executable: /usr/bin/slirp4netns
Package: slirp4netns-0.4.0-20.1.dev.gitbbd6f25.fc31.x86_64
Version: |-
slirp4netns version 0.4.0-beta.3+dev
commit: bbd6f25c70d5db2a1cd3bfb0416a8db99a75ed7e
uptime: 45h 11m 12.94s (Approximately 1.88 days)
registries:
blocked: null
insecure: null
search:
- docker.io
- registry.fedoraproject.org
- quay.io
- registry.access.redhat.com
- registry.centos.org
store:
ConfigFile: /home/avi/.config/containers/storage.conf
ContainerStore:
number: 32
GraphDriverName: overlay
GraphOptions:
overlay.mount_program:
Executable: /usr/bin/fuse-overlayfs
Package: fuse-overlayfs-0.6.4-2.fc31.x86_64
Version: |-
fusermount3 version: 3.6.2
fuse-overlayfs: version 0.6.4
FUSE library version 3.6.2
using FUSE kernel interface version 7.29
GraphRoot: /home/avi/.local/share/containers/storage
GraphStatus:
Backing Filesystem: extfs
Native Overlay Diff: "false"
Supports d_type: "true"
Using metacopy: "false"
ImageStore:
number: 4
RunRoot: /run/user/1000
VolumePath: /home/avi/.local/share/containers/storage/volumes
Package info (e.g. output of rpm -q podman or apt list podman):
podman-1.6.1-2.fc31.x86_64
Additional environment details (AWS, VirtualBox, physical, etc.):
Physical
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 27 (14 by maintainers)
I was taught to disable SELinux on any machine I touch.
After
setenforce 0it works.