CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Permission denied issue for OpenFoam 2.3.1 on Ubuntu

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 5 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 2, 2015, 18:35
Default Permission denied issue for OpenFoam 2.3.1 on Ubuntu
  #1
New Member
 
Randal Samstag
Join Date: Jan 2015
Location: Bainbridge Island, WA US
Posts: 8
Rep Power: 11
rsamstag is on a distinguished road
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
rsamstag is offline   Reply With Quote

Old   October 3, 2015, 11:34
Default
  #2
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer:
Code:
chmod +x All*
Changes permissions to all the scripts to be executable.

edit: 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

Last edited by wyldckat; October 3, 2015 at 12:02. Reason: see "edit:" and "edit2:"
wyldckat is offline   Reply With Quote

Old   October 3, 2015, 12:58
Default
  #3
New Member
 
Randal Samstag
Join Date: Jan 2015
Location: Bainbridge Island, WA US
Posts: 8
Rep Power: 11
rsamstag is on a distinguished road
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
rsamstag is offline   Reply With Quote

Old   October 3, 2015, 13:09
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Hi Randal,

Quote:
Originally Posted by rsamstag View Post
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 View Post
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
__________________
wyldckat is offline   Reply With Quote

Old   October 3, 2015, 13:22
Default
  #5
New Member
 
Randal Samstag
Join Date: Jan 2015
Location: Bainbridge Island, WA US
Posts: 8
Rep Power: 11
rsamstag is on a distinguished road
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
rsamstag is offline   Reply With Quote

Old   October 3, 2015, 15:12
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
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
wyldckat is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANSYS CFX 14 on UBUNTU 12.04 64bit: PARALLEL ISSUE david.pasquale CFX 6 August 9, 2018 15:05
[OpenFOAM.org] [SOLVED] Some packages could not be installed in OpenFOAM 2.3.1 in Ubuntu 14.04 LTS yardsail OpenFOAM Installation 0 April 20, 2015 11:50
Changing Polynomial Properties of species from 8 to 16 coefficients Kenna OpenFOAM Programming & Development 1 November 20, 2013 03:44
Ubuntu: Allrun script issue fletc900 OpenFOAM Bugs 2 July 2, 2010 16:58


All times are GMT -4. The time now is 04:11.