Hi,
I have a container file which will run as USER arun and also want to do a bind mount for a logs folder to a local folder. I'm not able to bind mount by below command.
podman run -d --name mycon -p 8080:8080 -v /home/student/EX188_practice/lab5/apachelog:/custom/lab/exercise/apache-tomcat-10.1.24/logs:Z myfirstimage:1.0
I can see the SELinux context is set correctly has correct access.
drwxr-xr-x. 2 student student system_u:object_r:container_file_t:s0:c254,c627 6 May 21 13:20 apachelog
Also noticed inside the container I can see the mount folder is created as root, how to overwrite this mount folder to be created for user arun?
Got the Solution to use podman unshare command to resolve the access issue.
podman unshare chown -R arun:arun foldername
this command will update the ownership so the container can access with user arun and group arun.
Got the Solution to use podman unshare command to resolve the access issue.
podman unshare chown -R arun:arun foldername
this command will update the ownership so the container can access with user arun and group arun.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.