[ SOLVED ] OTRS 4.0.9 Ubuntu 12.04 cron failed

Moderator: crythias

Locked
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

[ SOLVED ] OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

Hi,

I'ts my first setup of OTRS. I installed the 4.0.9 with ITSM module on a Ubuntu 12.04 machine.

OTRS is runing fine, i can access GUI, but it says the scheduler is not running.

I came into console and then

Code: Select all

cd /opt/otrs/var/cron 
sudo su otrs
for foo in *.dist; do cp $foo `basename $foo .dist`; done

Image

Thanks for help.
Last edited by civodul4 on 30 Jun 2015, 17:29, edited 2 times in total.
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by crythias »

it appears that the user otrs does not use bash as shell.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

Thanks for your answer but i don't understand, how can i change it ?

Thank you.
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by RStraub »

What's the output of this command?
cat /etc/passwd | grep otrs
For me it's

Code: Select all

otrs:x:999:999:OTRS user:/opt/otrs/:/bin/bash
At the last column (last ":") you see the configured shell. In this example it's /bin/bash
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

The ouput is :

Code: Select all

otrsadmin:x:1000:1000:otrsadmin,,,:/home/otrsadmin:/bin/bash
otrs:x:999:33:OTRS user:/opt/otrs/:/usr/local/bin/bash
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by RStraub »

Wellp,

changing that "/usr/local/bin/bash" to "/bin/bash" should give your user the proper shell.

EDIT: And then logging out and back in.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

Sorry for taking your time, but how can i change this ?

i'm noob under Linux.... :oops:
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by crythias »

You could at least try to search before asking.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

Yes, i searched but wanted to be sure....

I launch :

Code: Select all

sudo chsh -s /bin/bash otrs
Now i'm facing another error :

Cannot open .....dist, permission denied.

Here is a ll view of the files :

Image

I guess the permissions on the files are wrong. What should i change ? Ownership ? is there a risk ?
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by crythias »

root owns the files. as user root

Code: Select all

chown otrs *.dist
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

Thanks again...


All seems good now, i tried the next command

Code: Select all

otrs@OTRS-SERVER:/opt/otrs/bin$ ./Cron.sh start
/opt/otrs/bin
Cron.sh - start/stop OTRS cronjobs
Copyright (C) 2001-2012 xxx, http://otrs.org/
"/opt/otrs/var/tmp/otrs-cron-tmp.3880":58: bad minute
errors in crontab file, can't install.
failed
I'm turning mad.....
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

All is good now.

Had a rogue file in the folder.


The web interface said again Scheduler is not running ? Do i have to do something else ?
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
civodul4
Znuny newbie
Posts: 13
Joined: 30 Jun 2015, 15:23
Znuny Version: 4.0.9
Real Name: Ludovic roche

Re: OTRS 4.0.9 Ubuntu 12.04 cron failed

Post by civodul4 »

Just had to wait...


Thanks to both of you Crythias and RStraub :wink: !!
OTRS 5.0.9
Ubuntu 16.04
Mariadb

Knowledge Grows When Shared
Locked