Raised This Month: $12 Target: $400
 3% 

How to start cs 1.6 linux servers as steam not root


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Vivo
Senior Member
Join Date: May 2014
Old 09-30-2014 , 23:23   How to start cs 1.6 linux servers as steam not root
Reply With Quote #1

Hello,
I have steam only servers, Linux hosted, I'm using nano /etc/rc.local to start servers on reboot, And it starts servers as root, How to start them as "Steam" i added user called steam and added password for it before i install server with steamcmd, Also i should upload files to ftp with steam user not root right ?
Btw, I searched i didn't find answer for this questions..
Thanka
__________________
ViRuSeS # The best Servers and Host: viruses.ga
CSGO: 185.107.96.150:27015 or viruses.ga:27015
TeamSpeak3: 185.107.96.150:9987 or viruses.ga
Welcome! Good luck and have fun enjoy your time.
Vivo is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-01-2014 , 01:49   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #2

Have you tried this?
__________________
fysiks is offline
Vivo
Senior Member
Join Date: May 2014
Old 10-01-2014 , 03:56   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #3

I'm using centos 6.5
This is right ?
PHP Code:
sudo -u steam cd /home/steam/steamcmd/27015
sudo 
-u steam ./hlds_run -game cstrike -master -secure -autoupdate -pingboost 2 +ip 95.172.92.152 +port 27015 +maxplayers 32 +hpk_maxsize 1 -debug -console -noaff -sys_ticrate 1000 +sv_lan 0 +map de_dust2 &

sudo -u steam cd /home/steam/steamcmd/27016
sudo 
-u steam ./hlds_run -game cstrike -master -secure -autoupdate -pingboost 2 +ip 95.172.92.152 +port 27016 +maxplayers 11 +hpk_maxsize 1 -debug -console -noaff -sys_ticrate 1000 +sv_lan 0 +map de_dust2 &

sudo -u steam cd /home/steam/steamcmd/27019
sudo 
-u steam ./hlds_run -game cstrike -master -secure -autoupdate -pingboost 2 +ip 95.172.92.152 +port 27019 +maxplayers 12 +hpk_maxsize 1 -debug -console -noaff -sys_ticrate 1000 +sv_lan 0 +map de_dust2 
Edit: Btw, What about files ? Should i add metamod and amx with steam user too on ftp ??
__________________
ViRuSeS # The best Servers and Host: viruses.ga
CSGO: 185.107.96.150:27015 or viruses.ga:27015
TeamSpeak3: 185.107.96.150:9987 or viruses.ga
Welcome! Good luck and have fun enjoy your time.

Last edited by Vivo; 10-01-2014 at 04:00.
Vivo is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 10-01-2014 , 04:07   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #4

It can cause problems uploading files as root because your steam user can be unable to modify existing files (log files for example)
So it would be the best to install everything as steam user.
__________________

Mordekay is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-01-2014 , 04:54   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #5

If you've already installed them as the root user, you should be able to change the owner and group of all the files to "steam".
__________________
fysiks is offline
Mordekay
Squirrel of Fortune
Join Date: Apr 2006
Location: Germany
Old 10-01-2014 , 05:06   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #6

Code:
chown -R user dir (or vise versa. don't remember, to long ago)
Yeah i forgot about this.
__________________

Mordekay is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 10-01-2014 , 05:13   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #7

Quote:
Originally Posted by Mordekay View Post
Code:
chown -R user dir (or vise versa. don't remember, to long ago)
Yeah i forgot about this.
chown and chgrp for owner and group respectively. Google can figure out the order of the parameters (or the actual manual if someone is familiar with the using the linux documentation).
__________________

Last edited by fysiks; 10-01-2014 at 05:13.
fysiks is offline
Vivo
Senior Member
Join Date: May 2014
Old 10-01-2014 , 06:50   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #8

Owner = Steam
But group still root.. it's important i mean i need to make it steam too ? how ?
i used: chown -R steam /home/steam/
And about start, It will start as steam now right ?
Thanks for everything btw..
EDIT: server didn't start, Why you don't answer my question ? Your posts are just like useless, Say yes it's right or say it's wrong and tell me what's right, Or say we don't know just !
__________________
ViRuSeS # The best Servers and Host: viruses.ga
CSGO: 185.107.96.150:27015 or viruses.ga:27015
TeamSpeak3: 185.107.96.150:9987 or viruses.ga
Welcome! Good luck and have fun enjoy your time.

Last edited by Vivo; 10-01-2014 at 07:15.
Vivo is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-01-2014 , 07:26   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #9

Quote:
Originally Posted by Vivo View Post
Owner = Steam
But group still root.. it's important i mean i need to make it steam too ? how ?
i used: chown -R steam /home/steam/
chown -R steam:steam /home/steam


Quote:
EDIT: server didn't start, Why you don't answer my question ? Your posts are just like useless, Say yes it's right or say it's wrong and tell me what's right, Or say we don't know just !
What is the error message? You aren't giving us much information. I've never used rc.local to start stuff for individual users, I've always used cron
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Vivo
Senior Member
Join Date: May 2014
Old 10-01-2014 , 07:38   Re: How to start cs 1.6 linux servers as steam not root
Reply With Quote #10

Quote:
Originally Posted by YamiKaitou View Post
chown -R steam:steam /home/steam



What is the error message? You aren't giving us much information. I've never used rc.local to start stuff for individual users, I've always used cron
Thanks
I'm using:
PHP Code:
su steam -'cd /home/steam/steamcmd/27015'
su steam -'./hlds_run -game cstrike -master -secure -autoupdate -pingboost 2 +ip 95.172.92.152 +port 27015 +maxplayers 32 +hpk_maxsize 1 -debug -console -noaff -sys_ticrate 1000 +sv_lan 0 +map de_dust2 &'

su steam -'cd /home/steam/steamcmd/27016'
su steam -'./hlds_run -game cstrike -master -secure -autoupdate -pingboost 2 +ip 95.172.92.152 +port 27016 +maxplayers 11 +hpk_maxsize 1 -debug -console -noaff -sys_ticrate 1000 +sv_lan 0 +map de_dust2 &'

su steam -'cd /home/steam/steamcmd/27019'
su steam -'./hlds_run -game cstrike -master -secure -autoupdate -pingboost 2 +ip 95.172.92.152 +port 27019 +maxplayers 12 +hpk_maxsize 1 -debug -console -noaff -sys_ticrate 1000 +sv_lan 0 +map de_dust2 &' 
And my servers are not starting
When i try it says: bash: ./hlds_run: Permission denied
__________________
ViRuSeS # The best Servers and Host: viruses.ga
CSGO: 185.107.96.150:27015 or viruses.ga:27015
TeamSpeak3: 185.107.96.150:9987 or viruses.ga
Welcome! Good luck and have fun enjoy your time.

Last edited by Vivo; 10-01-2014 at 07:41.
Vivo is offline
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

Forum Jump


All times are GMT -4. The time now is 03:19.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode