CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Permission denied issue for OpenFoam 2.3.1 on Ubuntu (https://www.cfd-online.com/Forums/openfoam-solving/160144-permission-denied-issue-openfoam-2-3-1-ubuntu.html)

rsamstag October 2, 2015 18:35

Permission denied issue for OpenFoam 2.3.1 on Ubuntu
 
I have successfully installed OpenFOAM on a virtual machine and in dual boot on a desktop. I have successfully compiled several of the tutorials and am able to visualize results in ParaView. So far so good. I am trying to run new cases developed as part of a workshop that I coordinated for CFD for Wastewater. These were developed and run in a Windows port of OpenFOAM. I have dropped the new cases into the VM running Ubuntu at home/randal/OpenFOAM/randal-2.3.1/run/cases. When I drop down into the sub directories and try to execute a run script I get a permission denied error:

home/randal/OpenFOAM/randal-2.3.1/run/tutorials/cases/s02_clarifier/Clarifier$ ./Allrun.pre
bash: ./Allrun.pre: Permission denied

I tried:

sudo chown -R /home/randal/OpenFOAM/

and got this reply:

chown: missing operand after ‘/home/randal/OpenFOAM/’

I then tried:

sudo chown -R randal /home/randal/OpenFOAM/

and it seemed that the command had been executed, but when I went back to the new case and tried the run script I got another 'Permission denied'.

Any help appreciated.

Randal

wyldckat October 3, 2015 11:34

Quick answer:
Code:

chmod +x All*
Changes permissions to all the scripts to be executable.

edit: :eek: My colleague Nelson was who delivered that session workshop and I was the one who helped prepare that case for him to present! :)

edit 2: I've added this question to the FAQ: http://openfoamwiki.net/index.php/FA...application.3F

rsamstag October 3, 2015 12:58

Thanks Bruno. That seems to have worked within the directory containing the script. Add a -R to get permissions for a bunch of sub-directories?

Nelson did a great job in the workshop. Thanks so much for your great efforts to do up the examples.

Cheers,

Randal

wyldckat October 3, 2015 13:09

Hi Randal,

Quote:

Originally Posted by rsamstag (Post 566368)
Add a -R to get permissions for a bunch of sub-directories?

It's advisable to use "chmod +x" only for the executable scripts. You can run from the "cases" folder the following command:
Code:

chmod +x */All*
and it will expand to the paths of the scripts. You can see what files it finds with this command if you run:
Code:

echo */All*
Quote:

Originally Posted by rsamstag (Post 566368)
Nelson did a great job in the workshop. Thanks so much for your great efforts to do up the examples.

Thanks and you're welcome!

Best regards,
Bruno

rsamstag October 3, 2015 13:22

Bruno,

May I indulge your Super Moderator status a bit more?

the chmod command delivered from within the Clarifier directory allowed the Allrun script to run, but it aborted as follows:

[0]
[0]
[0] --> FOAM FATAL ERROR:
[0] driftFluxFoam: cannot open case directory "/home/randal/OpenFOAM/randal-2.3$
[0]
[0]
FOAM parallel run exiting
[0]

Another permissions error?

Thanks again for your help.

Randal

wyldckat October 3, 2015 15:12

Hi Randal,

That's a very odd error message!?

Ah, OK, I've ran the case on my side on Linux and I've gotten the same issue, although a bit different:
Code:

driftFluxFoam: cannot open case directory "/home/ofuser/clarifier/processor0"
The problem is that everything was prepared to run on Windows with blueCFD-Core, so there are some files that need some small changes for them to work on Linux.

Please run the following commands within the "clarifier" folder:
Code:

./Allclean
find . -name "*.C" | xargs sed -i -e 's=\.T\.H=.H='

This will adjust the source code files.

And now you should be able to run Allrun with success... er, actually, driftFluxFoam won't run well yet. The case that was prepared for blueCFD-Core 2.3-1, which is based in OpenFOAM 2.3.x from March 18th, 2014. But since then, OpenFOAM 2.3.x continued to be updated and improved and OpenFOAM 2.3.1 was release on the 10th of December of 2014. In this version of OpenFOAM, driftFluxFoam was updated to work with all turbulence models, while the version in OpenFOAM 2.3.x from March is using an internal k-epsilon turbulence model.

I'll send you a private message in a few minutes, so that I can send you the updated case via email.

Best regards,
Bruno


All times are GMT -4. The time now is 01:55.