CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Programming & Development

Is it safe to change owner of src to root?

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
Old   February 20, 2014, 03:40
Default Is it safe to change owner of src to root?
  #1
Member
 
Christian Butcher
Join Date: Jul 2013
Location: Japan
Posts: 84
Rep Power: 4
chrisb2244 is on a distinguished road
So essentially I have myself a nice working copy of OF-2.2.2
I'm writing my own applications and libraries in my OpenFOAM/user-2.2.2/... directories, and all is well.
I'm referring to the original source files in OpenFOAM/OpenFOAM-2.2.2/src/... directories.

My question is, whilst I have these open in an editor to refer to, sometimes I make changes to the original /src files, which I don't want to do, and accidentally save them. Usually I notice, undo the changes, and save them again, but I'm worried I might change the source files, save them, and not notice. Now until I wmake in the src directories, this won't change my installation (right?) and so shouldn't matter, but it does mean that I might later be referring to source files which are not as they originally were.

Is it safe to type
Code:
cd src
sudo chown -R root *
such that then the directories under the src directory have permissions like (viewed via ls -l)
Code:
-rwxr-xr-x  1 root christian 2057 10月  3 19:28 Allwmake
drwxr-xr-x 13 root christian 4096 11月 20 15:32 combustionModels
drwxr-xr-x  9 root christian 4096 11月 20 15:25 conversion
drwxr-xr-x  6 root christian 4096 10月  3 19:28 dummyThirdParty
drwxr-xr-x 11 root christian 4096 11月 20 15:26 dynamicFvMesh
drwxr-xr-x 22 root christian 4096 11月 20 15:25 dynamicMesh
...
chrisb2244 is offline   Reply With Quote

Old   February 20, 2014, 07:54
Default
  #2
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 152
Rep Power: 10
dkxls will become famous soon enough
Shouldn't be a problem. I have a global installation in
Code:
/opt/openfoam/OpenFOAM-2.2.x
and all directories/files are owned by root with permissions for directories like this
Code:
-rwxr-xr-x  1 root root 2057 Feb 18 16:09 Allwmake
drwxr-xr-x 13 root root 4096 Feb 18 18:44 combustionModels
drwxr-xr-x  9 root root 4096 Feb 18 20:51 conversion
drwxr-xr-x  6 root root 4096 Feb 18 20:51 dummyThirdParty
drwxr-xr-x 11 root root 4096 Feb 18 18:26 dynamicFvMesh
drwxr-xr-x 22 root root 4096 Feb 18 18:24 dynamicMesh                                                                                
...
and files like this
Code:
-rw-r--r-- 1 root root 11601 Feb 18 16:09 basicThermo.C
-rw-r--r-- 1 root root 47217 Feb 18 18:29 basicThermo.dep
-rw-r--r-- 1 root root 13079 Feb 18 16:09 basicThermo.H
-rw-r--r-- 1 root root  5944 Feb 18 16:09 basicThermoTemplates.C
dkxls is offline   Reply With Quote

Old   February 20, 2014, 07:59
Default
  #3
Senior Member
 
dkxls's Avatar
 
Armin
Join Date: Feb 2011
Location: Helsinki, Finland
Posts: 152
Rep Power: 10
dkxls will become famous soon enough
Oh and keep in mind that your files in
Code:
platforms/linux64GccDPOpt/bin/
platforms/linux64GccDPOpt/lib/
need to have the executable bit set like this:
Code:
-rwxr-xr-x 1 root root   80713 Feb 18 19:06 adiabaticFlameT
-rwxr-xr-x 1 root root  821456 Feb 18 19:10 adjointShapeOptimizationFoam
-rwxr-xr-x 1 root root  145485 Feb 18 18:59 ansysToFoam
-rwxr-xr-x 1 root root  606887 Feb 18 19:04 applyBoundaryLayer
-rwxr-xr-x 1 root root  234104 Feb 18 19:04 applyWallFunctionBoundaryConditions
-rwxr-xr-x 1 root root   26827 Feb 18 19:02 attachMesh
-rwxr-xr-x 1 root root   73235 Feb 18 19:02 autoPatch
-rwxr-xr-x 1 root root   98549 Feb 18 18:59 autoRefineMesh
-rwxr-xr-x 1 root root   96535 Feb 18 19:00 blockMesh
...
dkxls is offline   Reply With Quote

Reply

Tags
chown src

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
ANSYS Workbench on "Uncertified" Linux Distros hsr CFX 237 May 30, 2015 03:37
How to change turbulence model in InterFoam Gildeh OpenFOAM Running, Solving & CFD 4 March 28, 2012 12:04
Change cell zone index/thread during simulation neilduffy1024 FLUENT 0 January 17, 2011 10:40
no enthalpy change across the momentum source Atit Koonsrisuk CFX 2 December 19, 2005 03:33
Multicomponent fluid Andrea CFX 2 October 11, 2004 05:12


All times are GMT -4. The time now is 21:14.