file ownership questions#713

Subscribe to file ownership questions 1 post, 1 voice

 
Avatar Ilyse Kazar 7 post(s) #1878

I’m quoting some text from the thread at http://studios.thoughtworks.com/discussion/forums/4/topics/302—which focuses on file permissions, but what is unanswered for me in the documentation (and I believe what is the cause of some serious problems with our original install of mingle and my attempts to reinstall) is the owner:group settings for the files.

David Rice wrote:

These are most likely permissions problems. Here’s what we recommend:
1. Create a standard unix account ( account without any superuser privileges ),eg a user called “mingle” with a dedicated group. ( ie not in a unix group that is shared with other user. )
2. Protect the home directory of the unix account above with read/write/execute for user/group only ( ie rwxrwx—- )
3. Install Mingle in the unix account ( step 1 ) ’s home directory
4. Setup “sudoer” access for those users who need to support mingle ( ie user will need to run “sudo su – minlge” to be the mingle user and install/configure/troubleshoot mingle ).
5. If mingle can’t not run on port 80 ( some Unix system has this restriction to not allow user to run application that listen to TCP port below 1024 ), have mingle listen on port, eg 8080. Then setup a Web server, eg Apache, to redirect the request from port 80 to port 8080. Apache can also use for https to encrypt all mingle network traffic.

There are some issues/questions this brings up about ownership. I am coming from the standpoint of someone who has only just begun to learn Linux server admin (and teaching myself by means of Googling madly to try to find out what I need to know, not the best way to go about it I guess) ... and who is dealing with a server (CentOS 5.2) that is set up to be admin’d via WHM and CPanel. So if anything sounds “wrong” here it is because I’m a beginner and/or a CPanel server is not necessarily the same in all regards as a straight CentOS box …

OK.

So if one wants to run mingle from a domain name set up on the server, everything within that domain has the owner:group of the domain owner. What the above instructions do not touch on is this important question. Here are the issues (with numbers to make it easier to respond … I truly do not like Beast, I hate bloatware but this is ridiculously bare bones IMHO)

ISSUE 1: When installing Mingle into a directory owned by a user on the server, does one install while logged in as root or as that user?

If I install when logged in as root, root ends up being the owner of the files installed. Permissions look OK but … ISSUE 2: am I right in thinking root should not own the mingle files? I’m thinking the installation should be done while logged in as the domain owner. Yes?

ISSUE 3: which account should be used to run the ./MingleServer start|stop|status commands?

And now another quote from the above-referenced thread. WPC wrote:

1. Check file names and sizes under mingle/.install4j. They should be something like this:
wpc$ pwd
/var/mingle/.install4j
wpc$ ls l
total 1496
-rw-r-r— 1 wpc wheel 20666 Nov 6 17:17 MessagesDefault
rw-r-r— 1 wpc wheel 102 Nov 6 17:17 i4jparams.conf
rw-r-r— 1 wpc wheel 730344 May 21 2007 i4jruntime.jar
rw-r-r— 1 wpc wheel 289 Nov 6 17:17 user.jar

When I install as the domain owner, the above files end up being owned by that account. When I install with a root login, the .install4j files end up being owned by root. So … what log-in am I supposed to use to install???? I guess this is a repeat but I see that “wpc” is in the “wheel” group which I thought is some kind of system group, not a user at all, yet no matter which way I try to install the .install4j files do NOT end up being owned by a wheel user.

Totally confused in NYC, having spent 8 hours today (unsuccessfully) wading through my Swamp Of Ignorance :-)

kazar