View Issue Details

IDProjectCategoryView StatusLast Update
0003567OpenFOAMBugpublic2020-10-14 16:05
ReporterskwdeAssigned To 
Status newResolutionopen 
PlatformUnixOSOtherOS Version(please specify)
Product Version 
Fixed in Version 
Summary0003567: cannot create $FOAM_RUN direcotry in docker container
DescriptionI am on a fresh centos7.7 Virtual Machine with linux kernel 3.10.0-1127.19.1.el7.x86_64.
I installed docker from the docker repository.

I follow the instructions, e.g. on

The container starts fine but I cannot do step 6:
mkdir -p $FOAM_RUN

It always triggers
mkdir: cannot create directory '/home/openfoam/run': Permission denied
Note, it doesn't matter if i start openfoam6-linux as root or my standard user.
I have the same issue with openfoam7-linux and openfoam8-linux.
TagsNo tags attached.



2020-10-14 13:34

updater   ~0011594

I haven't tested on CentOS 7.7, but have tested it on Ubuntu 20.04. My guess is that there is an issues associated to SELinux, for which instructions are provided here:

@skwde: Please edit the file "/usr/bin/openfoam8-linux" (or similar) and find this line near the end:


Then change it to this:

    -v $MOUNT_DIR:$HOME_DIR:z \


2020-10-14 13:54

reporter   ~0011595

@wyldckat Thanks for your reply. Unfortunately this didn't solve the issue.

I also tried to temporarily disable selinux (via setenforce 0), but I still face the same issue.
Any other ideas?


2020-10-14 15:24

updater   ~0011598

Without having to install CentOS 7.7 on a VM myself, more details are needed... the first few that come to mind are:

1. Knowing what the following command gives you when inside the container (when you run the launching script):

    ls -ld $HOME
    echo $USER

2. Seeing what you see when the container finishes starting up... it should give additional error/warning messages.


2020-10-14 15:41

reporter   ~0011599

Below the output you asked for. Notebly $USER is not set.
export USER=openfoam does not solve the issue.
id reveals that the centos uid and gid are correctly matched to the openfoam user / group.

Besides, startup does not show any errors.

OpenFOAM-6(1) ls -ld $HOME
drwxr-xr-x. 2 openfoam openfoam 2048 Oct 9 08:18 /home/openfoam
OpenFOAM-6(2) echo $USER


$ openfoam6-linux
Launching /usr/bin/openfoam6-linux
Welcome to the OpenFOAM v6 Docker Image

Provides bash terminal with OpenFOAM 6 and ParaView 5.6.0

Produced and maintained by CFD Direct (, on behalf of the
OpenFOAM Foundation (, the owner and distributor of
OpenFOAM as free, open source software under the General Public Licence v3.

Further Resources:
* OpenFOAM User Guide:
* C++ Source Guide:
* OpenFOAM Training:
* Running in the Cloud:
* Issue (Bug) Reporting:
* Subscribe to Newsletter:
* Contributors to OpenFOAM:



2020-10-14 15:57

updater   ~0011600

It's not clear from this... without a noticeable detail, it's nearly impossible to diagnose the issue without trying it myself...

The best I can do at the moment is to point you to step-by-step building instructions, provided by the community for OpenFOAM 6 + CentOS 7.5:

This issue seems to be related to Docker and CentOS, which mostly falls outside of the OpenFOAM Foundation issue tracker's objectives. Mounting the path of a host's user folder within the Docker seems the main issue.

- Either it's being signalled in the "/var/log/audit/*" files...
- Or in some of Docker's own log files...


2020-10-14 16:05

reporter   ~0011601

Alright, thanks a lot for your help anyhow.

Issue History

Date Modified Username Field Change
2020-10-09 11:49 skwde New Issue
2020-10-14 13:34 wyldckat Note Added: 0011594
2020-10-14 13:54 skwde Note Added: 0011595
2020-10-14 15:24 wyldckat Note Added: 0011598
2020-10-14 15:41 skwde Note Added: 0011599
2020-10-14 15:57 wyldckat Note Added: 0011600
2020-10-14 16:05 skwde Note Added: 0011601