|
[Sponsors] |
August 6, 2009, 19:02 |
OpenFoam 1.6 Permissions in Ubuntu 9.04
|
#1 |
Member
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 17 |
I'm trying to install OpenFoam 1.6 on Ubuntu 9.04. I have downloaded and unpacked the four download files, and edited the $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc file as stated in the readme file installation notes.
When I try to source the file, or open a new terminal window, I get the following message: bash: /home/alan/OpenFOAM/OpenFOAM-1.6/etc/bashrc: Permission Denied. I have permission to edit the .bashrc file in my home directory, but not the bashrc file or other files (like the controlDict) that were unpacked in the OpenFOAM directories. Do I have a problem with permissions? How do I correct it, so I can update my environment? Thanks in advance, Alan |
|
August 7, 2009, 06:49 |
|
#2 |
Senior Member
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 556
Rep Power: 27 |
Hey try this
sudo chown -R alan:yourgroup /home/alan/OpenFOAM/ sudo chmod -R 755 /home/alan/OpenFOAM/ Substitute yourgroup in the first line with a group if you need some other user to access your openfoam install files, otherwise just neglect it and do sudo chown -R alan /home/alan/OpenFOAM/ sudo chmod -R 755 /home/alan/OpenFOAM/ It should work. |
|
August 7, 2009, 15:04 |
Thank you
|
#3 |
Member
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 17 |
linnemann,
Thank you, that fixed it. I will get better at Linux eventually. I made (and already fixed) the same mistake I read in some other threads: The installation instructions tell you to make a directory called $HOME/OpenFOAM. I made one called "/home/OpenFOAM" - which is wrong. Type $HOME in the terminal and make the OpenFOAM directory there. In my case that's "/home/alan/OpenFOAM". With directories in the right place and permissions set correctly, the directions in the readme file worked for my installation. |
|
August 13, 2009, 19:22 |
|
#4 |
Member
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 36
Rep Power: 17 |
Alan,
baaah,, I'm flummuxed completely now.... I'm a complete newbie to Linux so I apologise for the basic question but where do I install Openfoam? $HOME/OpenFOAM seems to be the favoured option but then you say at the end of your post "In my case that's "/home/alan/OpenFOAM" A most confused Nick |
|
August 13, 2009, 19:31 |
|
#5 |
Member
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 17 |
I'm pretty new at linux myself. $HOME is not the same thing as /home. To find out what it is on your system enter 'echo $HOME'. When I do that, I get /home/alan. The correct installation directory for OpenFOAM on my system is: $HOME/OpenFOAM which is the same directory as /home/alan/OpenFOAM. Don't make the mistake I made and put it in /home/OpenFOAM.
I hope this helps. I'm still having problems getting ParaFoam to work. Alan |
|
August 13, 2009, 19:40 |
|
#6 |
Member
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 36
Rep Power: 17 |
Not suprisingly when I type that in I get /home/nick !!
What has just twigged in my head is that $HOME is a shorthand for the USER directory. Thankyou, that is making a bit more sense |
|
August 13, 2009, 20:31 |
|
#7 |
Member
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 36
Rep Power: 17 |
I've had exactly the same permissions trouble , but the second post fixed it good and proper.
I'm completely unable to run either the foamSystemCheck or the foamInstallationTest scripts though , I just get a "command not found" error. |
|
August 14, 2009, 16:08 |
|
#8 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
You should not have any troubles with permissions extracting OpenFOAM into your home directory, so I think something isn't right from the get-go.
Your system cannot find the files because the bashrc file is probably not being sourced. Maybe a wrong path in your ~/.bashrc. By the way, "~/" is equivalent to "$HOME/". |
|
August 14, 2009, 18:38 |
|
#9 |
Member
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 36
Rep Power: 17 |
I've checked and double checked the paths but no joy.
So literally I have this as my last few lines of my bashrc file. (So this is my $HOME/bashrc) ; # this, if it's already enabled in /etc/bash.bashrc and /etc/profile # sources /etc/bash.bashrc). if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi . $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc |
|
August 14, 2009, 18:48 |
|
#10 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
That looks ok. Try executing ". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" in a terminal window and if there is no output try executing foamInstallationTest in that terminal.
|
|
August 14, 2009, 18:55 |
|
#11 |
Member
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 36
Rep Power: 17 |
not a sausage
nick@nick-desktop:~$ .$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc bash: ./home/nick/OpenFOAM/OpenFOAM-1.6/etc/bashrc: No such file or directory nick@nick-desktop:~$ |
|
August 14, 2009, 18:57 |
|
#12 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
You need a space between the dot and $HOME
|
|
August 14, 2009, 19:07 |
|
#13 |
Member
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 36
Rep Power: 17 |
ahh hah ! thats sorted it a treat.
Thanks So what has happened? I figure the $HOME /bashrc file is a bit like an autoexec.bat and config.sys files of yesteryear and then adding this line references the openfoam bashrc file that then sets up the envoirenment variables..... So typing this last line into the terminal (.$HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc)registered the OpenFoam bashrc onto the system ? rather than letting the $home/bashrc file do it???????? |
|
August 14, 2009, 19:21 |
|
#14 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
Yeah, the bashrc is actually a lot like autoexec.bat, except that each user has his own bashrc. Executing ". $HOME/OpenFOAM/OpenFOAM-1.6/etc/bashrc" does set up all the environment variables.
Exactly the same happens by adding that line to ~/.bashrc, except that the command in ~/.bashrc is only executed when you open a new terminal (like autoexec.bat is only executed once after booting). So all you did was manually source the file instead of letting the system do it. |
|
December 28, 2009, 20:45 |
|
#15 |
Senior Member
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 18 |
hello Nick,
I think you need to edit $HOME/.bashrc not $HOME/bashrc (dot missing!) you do not see this file with 'ls' but with 'ls -a' you do. Hope this helps Wouter |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to Install OpenFOAM on 64 Ubuntu 9.04 | hansel | OpenFOAM Installation | 62 | March 19, 2010 15:43 |
OpenFOAM 1.6 package - CentOS 5.3 x86_64 | linnemann | OpenFOAM Installation | 36 | September 2, 2009 13:46 |
OpenFOAM Version 1.6 Released | opencfd | OpenFOAM Announcements from ESI-OpenCFD | 0 | July 27, 2009 18:55 |
OpenFOAM Installation Ubuntu 9.04 Problems | Sumontro | OpenFOAM Installation | 8 | July 21, 2009 22:40 |
Adventure of fisrst openfoam installation on Ubuntu 710 | jussi | OpenFOAM Installation | 0 | April 24, 2008 15:25 |