linux server setup question
01-03-2008, 14:15
|
#1
|
|
Old dog, New tricks
Join Date: Dec 2006
Location: Lincoln UK
Services: 20Mb on occasions
Posts: 711
|
linux server setup question
I have full control of our gaming server with an account that gives me root access and another that is limited to the home folder. Call them 'admin' and 'user'.
I intend to load the CoD4 game folders into 'home' and chmod the ownership to 'user'.
I have a bash script to start the server running. What I'm not certain about is whether that script should be owned by 'user' or 'admin' and does it make any difference?
Climbing a fairly steep learning curve here and would be grateful for assistance.
__________________
-= David =-
"Any sufficiently advanced political correctness is indistinguishable from irony." -- Erik Naggum
|
|
|
01-03-2008, 14:36
|
#2
|
|
Eric Cartman Wannabe
Join Date: Jun 2003
Location: Cockney geeza land
Age: 27
Services: c:\> net start punky
Posts: 12,086
|
Re: linux server setup question
As a rule you never run anything as root (admin) unless you absolutely have to. For COD4, its fine to run it as user.
do a:
to check who owns the files, it will probably already be user unless you copied them over as root. if need be you can change ownership by going inside the COD4 folder and using:
Code:
chown -R user:user *
That changes all files and folders to the user owner and user group
---------- Post added at 14:36 ---------- Previous post was at 14:34 ----------
P.S. I recommend signing up to the COD4 linux server mailing list as well.
http://icculus.org/
__________________
"We're not here for a long time, we're here for a good time" - Mike Ness (Social Distortion)
"Reach for the sky, 'cause tomorrow may never come" - Reach For The Sky (Social Distortion)
Last edited by punky; 01-03-2008 at 14:41.
|
|
|
01-03-2008, 14:43
|
#3
|
|
Old dog, New tricks
Join Date: Dec 2006
Location: Lincoln UK
Services: 20Mb on occasions
Posts: 711
|
Re: linux server setup question
Thanks for the prompt reply Gavin. I copied the folders already with the admin account so it seems likely that I'll have to do the chown. I'll check that next and see what I can break..
__________________
-= David =-
"Any sufficiently advanced political correctness is indistinguishable from irony." -- Erik Naggum
|
|
|
02-03-2008, 10:57
|
#4
|
|
Old dog, New tricks
Join Date: Dec 2006
Location: Lincoln UK
Services: 20Mb on occasions
Posts: 711
|
Re: linux server setup question
I have to admit now I've come up against another issue that I can't understand just yet.
Initially the folders all showed in ls as belonging to admin:admin including the bash script. If I run the .sh then the server starts and runs just fine, although it is running from root.
So, I chown all the files to 'user' and log into my user account.
./ to run the bash script and nada.. Nothing..
where should I start checking next? Could it be individual file permissions that I need to check?
__________________
-= David =-
"Any sufficiently advanced political correctness is indistinguishable from irony." -- Erik Naggum
|
|
|
02-03-2008, 11:18
|
#5
|
|
Eric Cartman Wannabe
Join Date: Jun 2003
Location: Cockney geeza land
Age: 27
Services: c:\> net start punky
Posts: 12,086
|
Re: linux server setup question
If you run the script it just gives you the prompt back? no error messages at all?
You could try posting the script, see if we can see anything, or you can try running the program manually:
Code:
./cod4_lnxded +set dedicated 2 +set sv_punkbuster 1 +exec server.cfg +map_rotate
replace server.cfg with the main config for your server inside main. If you leave it off, I think it uses a default built-in on though, but not 100%
__________________
"We're not here for a long time, we're here for a good time" - Mike Ness (Social Distortion)
"Reach for the sky, 'cause tomorrow may never come" - Reach For The Sky (Social Distortion)
Last edited by punky; 02-03-2008 at 11:28.
|
|
|
02-03-2008, 11:52
|
#6
|
|
Old dog, New tricks
Join Date: Dec 2006
Location: Lincoln UK
Services: 20Mb on occasions
Posts: 711
|
Re: linux server setup question
The startup script:
--------------------------------------------------------------------------
#! /bin/bash
screen -r cod428960 -X quit
screen -dmS cod428960 ./cod4base/cod4_lnxded +set dedicated 2 +net_port 28960 +set fs_basepath "/home/cod4base" +set fs_homepath "/home/cod428960" +exec server.cfg +map_rotate
----------------------------------------------------------------------------
cod428960 contains all the config files.
cod4base is the executables etc.
I don't get any error message. It just drops back to a prompt without any clues.
__________________
-= David =-
"Any sufficiently advanced political correctness is indistinguishable from irony." -- Erik Naggum
|
|
|
02-03-2008, 12:24
|
#7
|
|
Eric Cartman Wannabe
Join Date: Jun 2003
Location: Cockney geeza land
Age: 27
Services: c:\> net start punky
Posts: 12,086
|
Re: linux server setup question
Oh I see, its running the screen command
what screen does is it detaches the program you are running from the window you are using, so you can close the window without the program ending. The screen command is set to bring you straight back to the prompt, because its set to automatically detach.
You are probably running loads of instances now, so the easiest thing to do is to reboot, and then run the script again. Once you've that you can confirm its running by trying to connect or by typing:
Code:
ps -ef | grep cod4_lnxded
and you should see a line with the +exec server bit in it.
Or you can bring the screen back by typing:
Code:
screen -r cod428960
or you could take out the -d parameter out of the screen command, which should leave the screen attached to the window.
__________________
"We're not here for a long time, we're here for a good time" - Mike Ness (Social Distortion)
"Reach for the sky, 'cause tomorrow may never come" - Reach For The Sky (Social Distortion)
|
|
|
02-03-2008, 13:14
|
#8
|
|
Old dog, New tricks
Join Date: Dec 2006
Location: Lincoln UK
Services: 20Mb on occasions
Posts: 711
|
Re: linux server setup question
Sorry, probably should have mentioned screen earlier.
"you could take out the -d parameter out of the screen command, which should leave the screen attached to the window."
That's an interesting idea. If I did that temporarily does that mean I'd see any error messages echoed back to my system?
In the long run I guess I need to detach the screen so that I can logout and leave everything running but that could be helpful while I try to find out what's happening.
Lol, I sort of got this role by accident. It's fascinating and frustrating in about equal measures at the moment. My thanks for your patience.
__________________
-= David =-
"Any sufficiently advanced political correctness is indistinguishable from irony." -- Erik Naggum
|
|
|
02-03-2008, 22:47
|
#9
|
|
Eric Cartman Wannabe
Join Date: Jun 2003
Location: Cockney geeza land
Age: 27
Services: c:\> net start punky
Posts: 12,086
|
Re: linux server setup question
Yes, leaving out the -d would echo all the output from the cod4 server onto your screen.
__________________
"We're not here for a long time, we're here for a good time" - Mike Ness (Social Distortion)
"Reach for the sky, 'cause tomorrow may never come" - Reach For The Sky (Social Distortion)
|
|
|
16-03-2008, 09:02
|
#10
|
|
Old dog, New tricks
Join Date: Dec 2006
Location: Lincoln UK
Services: 20Mb on occasions
Posts: 711
|
Re: linux server setup question
Thanks Gavin for pointing me in the right direction. Once I realised that I could keep the screen attached and see the result of the startup script it all became clear(ish)..
Doing it that way revealed a permissions error. The game was was trying and failing to create a runtime folder.
Once 'run as user' was defined everything was sweetness and light.
Now to get to grips with the .cfg options..
__________________
-= David =-
"Any sufficiently advanced political correctness is indistinguishable from irony." -- Erik Naggum
|
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 11:56.
|