View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003567||OpenFOAM||Bug||public||2020-10-09 11:49||2020-10-14 16:05|
|Platform||Unix||OS||Other||OS Version||(please specify)|
|Fixed in Version|
|Summary||0003567: cannot create $FOAM_RUN direcotry in docker container|
|Description||I 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 https://openfoam.org/download/6-linux/
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.
|Tags||No tags attached.|
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: https://docs.docker.com/storage/bind-mounts/#configure-the-selinux-label
@skwde: Please edit the file "/usr/bin/openfoam8-linux" (or similar) and find this line near the end:
-v $MOUNT_DIR:$HOME_DIR \
Then change it to this:
-v $MOUNT_DIR:$HOME_DIR:z \
@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?
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
2. Seeing what you see when the container finishes starting up... it should give additional error/warning messages.
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
User: "<MY CENTOS USER>" (ID <MY CENTOS UID>, group ID <MY CENTOS GID>)
Welcome to the OpenFOAM v6 Docker Image
Provides bash terminal with OpenFOAM 6 and ParaView 5.6.0
Produced and maintained by CFD Direct (https://cfd.direct), on behalf of the
OpenFOAM Foundation (https://openfoam.org), the owner and distributor of
OpenFOAM as free, open source software under the General Public Licence v3.
* OpenFOAM User Guide: https://cfd.direct/openfoam/user-guide
* C++ Source Guide: https://cpp.openfoam.org
* OpenFOAM Training: https://cfd.direct/openfoam-training
* Running in the Cloud: https://cfd.direct/cloud
* Issue (Bug) Reporting: https://bugs.openfoam.org
* Subscribe to Newsletter: https://cfd.direct/news
* Contributors to OpenFOAM: https://openfoam.org/dev/contributors
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: https://openfoamwiki.net/index.php/Installation/Linux/OpenFOAM-6/CentOS_SL_RHEL#CentOS_7.5_.281804.29
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...
||Alright, thanks a lot for your help anyhow.|
|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|