View Issue Details

IDProjectCategoryView StatusLast Update
0003679OpenFOAMBugpublic2021-05-23 15:34
Reportermasataro asaiAssigned To 
PrioritynormalSeveritytrivialReproducibilityalways
Status newResolutionopen 
PlatformGNU/LinuxOSFedoraOS Version32
Product Version 
Fixed in Version 
Summary0003679: SELinux error in default docker command in the script http://dl.openfoam.org/docker/openfoam8-linux
DescriptionMy machine is SELinux Enforced.
With a standard setup following the tutorial, it could not run `ls` right after launch due to `ls: cannot open directory '.': Permission denied`.
The issue is caused by SELinux.
https://stackoverflow.com/questions/24288616/permission-denied-on-accessing-host-directory-in-docker

Adding :Z to every volume mounting argument in openform8-linux will fix this issue.

--- openfoam8-linux 2020-07-22 05:09:44.000000000 -0400
+++ /home/masataro/.local/bin/openfoam8-linux 2021-05-23 10:32:59.120048896 -0400
@@ -124,11 +124,11 @@
         xauth -f "$XAUTH_PATH" nmerge -
 
     DOCKER_OPTIONS="-e XAUTHORITY=$XAUTH_PATH
- -v $XAUTH_PATH:$XAUTH_PATH
+ -v $XAUTH_PATH:$XAUTH_PATH:Z
                     --net=host"
 else
     DOCKER_OPTIONS="-e XAUTHORITY=/home/openfoam/.Xauthority \
- -v $XAUTHORITY:/home/openfoam/.Xauthority"
+ -v $XAUTHORITY:/home/openfoam/.Xauthority:Z"
 fi
 
 USER_ID=$(id -u 2> /dev/null)
@@ -146,8 +146,8 @@
     --rm \
     -e DISPLAY=$DISPLAY \
     -u $USER_ID:$GROUP_ID \
- -v /tmp/.X11-unix:/tmp/.X11-unix \
- -v $MOUNT_DIR:$HOME_DIR \
+ -v /tmp/.X11-unix:/tmp/.X11-unix:Z \
+ -v $MOUNT_DIR:$HOME_DIR:Z \
     $DOCKER_OPTIONS \
     $DOCKER_IMAGE
TagsNo tags attached.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2021-05-23 15:34 masataro asai New Issue