[Ubuntu] Xaseco permission denied

Discuss everything about Xymph's Aseco flavoured server control scripts for TM Forever / classic TMN and for TM² Canyon.

Moderators: Xymph, TM-Patrol

Post Reply
s0xen
happy cruiser
happy cruiser
Posts: 115
Joined: 11 Nov 2007 20:31
Owned TM-games: TMN

[Ubuntu] Xaseco permission denied

Post by s0xen » 13 Feb 2010 08:52

Hello.

Im trying to setup a Trackmania server with aseco.

When I do: sudo /etc/init.d/aseco start
It give me to following error:

Code: Select all

Starting aseco: aseco /home/ordian/tmf/xaseco/Aseco.sh: line 2: aseco.log: Permission denied
I allready chmodded Aseco.sh aseco.php aseco.log
But when I start aseco from aseco.sh
I just starts to work, and give the pid id.

Start script:

Code: Select all

#!/bin/sh
#
# Starts aseco script
#
# chkconfig: 345 94 06
# description: aseco is the TMN server manager.

MYDESC="aseco1"
MYPATH=/home/ordian/tmf/aseco1
MYNAME=aseco1
MYLOCK=$MYNAME
DAEMON=$MYPATH/Aseco1.sh
MYPIDF=/var/run/$MYNAME.pid
MYCMND="$MYPATH/Aseco1.sh"

# Source function library.
. /lib/lsb/init-functions

# Make sure the daemon directory is in the front of the path list
PATH=$MYPATH:$PATH

# See how we were called.
case "$1" in
  start)
        # Change to package directory so config paths can be relative
        cd $MYPATH || \
          { echo "$0: Can't cd to $MYPATH" ; exit 1 ; }
        # Make sure the daemon exists
        [ -f $DAEMON ] || \
          { echo "$0: Daemon not found: $DAEMON" ; exit 1 ; }
        # See if we are already running
        # Note: kill -0 _PID_
        #       returns true if process _PID_ is alive and accepting signals.
        [ -f $MYPIDF ] && kill -0 `cat $MYPIDF` 2>/dev/null && \
          { echo "$0: $MYPIDF exists and process is running" ; exit 1 ; }
        echo -n "Starting $MYDESC: "
        echo -n "$MYNAME "
        su -l -c "$MYCMND &" ordian > $MYPIDF
        chown ordian $MYPIDF
        echo
        touch /var/lock/subsys/$MYLOCK
        ;;
  stop)
        echo -n "Shutting down $MYDESC: "
        echo -n "$MYNAME "
        killproc $MYNAME
        rm -f $MYPIDF
        echo
        rm -f /var/lock/subsys/$MYLOCK
        ;;
  status)
        status $MYNAME
        ;;
  restart)
        $0 stop
        sleep 1
        $0 start
        ;;
  *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
esac

exit 0
My Aseco.sh

Code: Select all

cd /home/ordian/tmf/aseco1
php aseco.php TMF2 </dev/null >aseco.log 2>&1 &
echo $!
EDIT: I also had to do: mkdir /var/lock/subsys because it couldn't touch it.
Last edited by s0xen on 13 Feb 2010 12:50, edited 1 time in total.

Lambda
happy cruiser
happy cruiser
Posts: 131
Joined: 22 Feb 2009 22:03
Owned TM-games: TMU+F, TM²C

Re: [Ubuntu] Xaseco permission denied

Post by Lambda » 13 Feb 2010 11:23

Understanding and Using File Permissions:
https://help.ubuntu.com/community/FilePermissions

s0xen
happy cruiser
happy cruiser
Posts: 115
Joined: 11 Nov 2007 20:31
Owned TM-games: TMN

Re: [Ubuntu] Xaseco permission denied

Post by s0xen » 13 Feb 2010 12:30

Ok, this is now fixed with "sudo chmod 777 /home/ordian/tmf/aseco1/aseco.log"

Second problem in the basic.inc.php, already searched the forum but, what helped the other guy doesn't work on my server :|

Code: Select all

Warning: fopen(logfile.txt): failed to open stream: Permission denied in /home/ordian/tmf/aseco1/includes/basic.inc.php on line 32

Warning: fwrite(): supplied argument is not a valid stream resource in /home/ordian/tmf/aseco1/includes/basic.inc.php on line 34
I tried:

Code: Select all

 sudo chmod 777 /home/ordian/tmf/aseco1/includes/basic.inc.php
But it won't start correctly.

Lambda
happy cruiser
happy cruiser
Posts: 131
Joined: 22 Feb 2009 22:03
Owned TM-games: TMU+F, TM²C

Re: [Ubuntu] Xaseco permission denied

Post by Lambda » 13 Feb 2010 12:53

try this: sudo chmod 777 /home/ordian/tmf/aseco1/logfile.txt

You can view file permissions with this command: ls -l

s0xen
happy cruiser
happy cruiser
Posts: 115
Joined: 11 Nov 2007 20:31
Owned TM-games: TMN

Re: [Ubuntu] Xaseco permission denied

Post by s0xen » 13 Feb 2010 14:14

Some how I fixed it :).
Now when I do sudo /etc/init.d/aseco1 stop
Xaseco doesn't shutdown :S

Lambda
happy cruiser
happy cruiser
Posts: 131
Joined: 22 Feb 2009 22:03
Owned TM-games: TMU+F, TM²C

Re: [Ubuntu] Xaseco permission denied

Post by Lambda » 13 Feb 2010 14:56

Maybe this: /home/ordian/tmf/aseco1/ stop or aseco1 stop

User avatar
szkodnik
cyclist
cyclist
Posts: 30
Joined: 17 Aug 2009 16:27
Owned TM-games: TMU, TMS, TMO
Manialink(s): tmtp://#join=szkodziu
Location: Poland, Szczecin

Re: [Ubuntu] Xaseco permission denied

Post by szkodnik » 14 Feb 2010 21:41

Ok, you fixed, but in 1st post:

Error:
/home/ordian/tmf/xaseco
Aseco.sh
/home/ordian/tmf/aseco1

check it
I don't know english, PHP and MySQL but I scratch along ; )
TM accs: 20szn, szkodziu, szkodnisia

s0xen
happy cruiser
happy cruiser
Posts: 115
Joined: 11 Nov 2007 20:31
Owned TM-games: TMN

Re: [Ubuntu] Xaseco permission denied

Post by s0xen » 14 Feb 2010 22:12

szkodnik wrote:Ok, you fixed, but in 1st post:

Error:
/home/ordian/tmf/xaseco
Aseco.sh
/home/ordian/tmf/aseco1

check it
Yes I know, I changed directories but I edited it :)

perycjusz
road tourist
road tourist
Posts: 85
Joined: 06 Feb 2009 03:00
Owned TM-games: TMU

Re: [Ubuntu] Xaseco permission denied

Post by perycjusz » 17 Feb 2010 15:28

chmod -R 777 /home/ordian/tmf
Image

Post Reply