CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Installation

OpenFoam 1.6 Permissions in Ubuntu 9.04

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 6, 2009, 18:02
Default OpenFoam 1.6 Permissions in Ubuntu 9.04
  #1
Member
 
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 16
AlanR is on a distinguished road
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
AlanR is offline   Reply With Quote

Old   August 7, 2009, 05:49
Default
  #2
Senior Member
 
linnemann's Avatar
 
Niels Nielsen
Join Date: Mar 2009
Location: NJ - Denmark
Posts: 555
Rep Power: 27
linnemann will become famous soon enough
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.
linnemann is offline   Reply With Quote

Old   August 7, 2009, 14:04
Default Thank you
  #3
Member
 
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 16
AlanR is on a distinguished road
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.
AlanR is offline   Reply With Quote

Old   August 13, 2009, 18:22
Default
  #4
Member
 
Nickul's Avatar
 
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 35
Rep Power: 17
Nickul is on a distinguished road
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
Nickul is offline   Reply With Quote

Old   August 13, 2009, 18:31
Default
  #5
Member
 
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 16
AlanR is on a distinguished road
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
AlanR is offline   Reply With Quote

Old   August 13, 2009, 18:40
Default
  #6
Member
 
Nickul's Avatar
 
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 35
Rep Power: 17
Nickul is on a distinguished road
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
Nickul is offline   Reply With Quote

Old   August 13, 2009, 19:31
Default
  #7
Member
 
Nickul's Avatar
 
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 35
Rep Power: 17
Nickul is on a distinguished road
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.
Nickul is offline   Reply With Quote

Old   August 14, 2009, 15:08
Default
  #8
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
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/".
akidess is offline   Reply With Quote

Old   August 14, 2009, 17:38
Default
  #9
Member
 
Nickul's Avatar
 
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 35
Rep Power: 17
Nickul is on a distinguished road
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
Nickul is offline   Reply With Quote

Old   August 14, 2009, 17:48
Default
  #10
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
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.
akidess is offline   Reply With Quote

Old   August 14, 2009, 17:55
Default
  #11
Member
 
Nickul's Avatar
 
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 35
Rep Power: 17
Nickul is on a distinguished road
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:~$
Nickul is offline   Reply With Quote

Old   August 14, 2009, 17:57
Default
  #12
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
You need a space between the dot and $HOME
akidess is offline   Reply With Quote

Old   August 14, 2009, 18:07
Default
  #13
Member
 
Nickul's Avatar
 
Nick
Join Date: Mar 2009
Location: England (South West)
Posts: 35
Rep Power: 17
Nickul is on a distinguished road
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????????
Nickul is offline   Reply With Quote

Old   August 14, 2009, 18:21
Default
  #14
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
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.
akidess is offline   Reply With Quote

Old   December 28, 2009, 19:45
Default
  #15
Senior Member
 
Wouter van der Meer
Join Date: May 2009
Location: Elahuizen, Netherlands
Posts: 203
Rep Power: 17
wouter is on a distinguished road
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
wouter 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
How to Install OpenFOAM on 64 Ubuntu 9.04 hansel OpenFOAM Installation 62 March 19, 2010 14:43
OpenFOAM 1.6 package - CentOS 5.3 x86_64 linnemann OpenFOAM Installation 36 September 2, 2009 12:46
OpenFOAM Version 1.6 Released opencfd OpenFOAM Announcements from ESI-OpenCFD 0 July 27, 2009 17:55
OpenFOAM Installation Ubuntu 9.04 Problems Sumontro OpenFOAM Installation 8 July 21, 2009 21:40
Adventure of fisrst openfoam installation on Ubuntu 710 jussi OpenFOAM Installation 0 April 24, 2008 14:25


All times are GMT -4. The time now is 17:57.