Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-15-2004, 11:20 AM   #1
LQ Newbie
Registered: Apr 2004
Posts: 2

Rep: Reputation: 0
script problem changing directories

ok heres the issue i have set up a remote linux server which i have installed medal of hour games on

and i have wrote a script to start the servers ruuning

the only problem is this



cd /home/servers

screen -dmS server1 ./mohaa_lnxded

it falls down on first part as it is not changing dir like i am telling it to

i have chmodded this file to 755 so i can run it also the dir are chmodded to 777

the server is running red hat

is there another way of doing this or is there somethink missing from the server install that stops this script from running

i know the game server works as if i change into the dir i can type in the

screen -dmS server1 ./mohaa_lnxded

and the server starts up

please help as head hurting from hitting head against solid object
Old 04-15-2004, 12:20 PM   #2
LQ Veteran
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390Reputation: 2390
Try using set -x to check which lines of your script are run and which are not ('debugging').

set -x
cd /home/servers
screen -dmS server1 ./mohaa_lnxded
PS: Don't open your box more then is needed. I hope you changed the permissions of ../servers/ to 777, not /home. Even 777 for servers is probably to open, 755 should do.
Old 04-15-2004, 12:21 PM   #3
Senior Member
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Where do you run this script from?
From a web script or manually as a logged in user?
Old 04-15-2004, 04:25 PM   #4
LQ Newbie
Registered: Apr 2004
Posts: 2

Original Poster
Rep: Reputation: 0
i run it from being a logged in user

like this ./


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem changing X terminal colors with script shadowsnipes Slackware 5 10-11-2005 12:15 AM
Script to run script in multiple directories... seabass55 Linux - General 5 07-06-2004 01:44 AM
Changing Permissions on Directories... bob4432 Linux - Newbie 6 06-25-2004 03:50 PM
Persmissions changing on root directories? granatica Linux - Security 2 06-14-2004 03:52 PM
Changing physical location of directories Linus VanPelt Mandriva 2 02-23-2004 08:42 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:09 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration