Cron permissions

Moderator: crythias

Locked
Misirkov
Znuny newbie
Posts: 2
Joined: 06 Feb 2014, 14:53
Znuny Version: 3.2.8
Real Name: Radul
Company: SFA

Cron permissions

Post by Misirkov »

Hi, I tried to install OTRS 3.3.4 system on Ubuntu 12.04 server. I'm able to start install.pl script in browser, but when I try to start "./Cron.sh start" with 'otrs' user I receive "Permission denied". My installation is based on instructions, which I found on https://help.ubuntu.com/community/OTRS#Installation, and INSTALL_me.md file. I'm noobie to Linux and running out of ideas. Realty can't find where is the problem. This is code that I use.

Code: Select all

# sudo aptitude update
# sudo aptitude dist-upgrade

# sudo aptitude install fetchmail

# cd/opt
# sudo wget http://ftp.otrs.org/pub/otrs/otrs-3.3.4.tar.gz 

# cd/opt
# sudo tar -xzvf otrs-3.3.4.tar.gz
# sudo mv otrs-3.3.4 /opt/otrs

# cd /opt/otrs/bin
# sudo ./otrs.CheckModules.pl

# sudo aptitude install liblwp-useragent-determined-perl libapache2-reload-perl libnet-smtp-ssl-perl libnet-smtp-tls-butmaintained-perl
# sudo aptitude install libgd-gd2-perl libgd-graph-perl libgd-text-perl libjson-xs-perl libnet-dns-perl libyaml-libyaml-perl libpdf-api2-simple-perl libtext-csv-xs-perl libxml-parser-perl libmail-imapclient-perl libnet-ldap-perl

# sudo useradd -d /opt/otrs/ -c 'OTRS user' otrs     
# sudo usermod -G www-data otrs

# cd otrs/Kernel/
# sudo cp Config.pm.dist Config.pm
# cd Config
# sudo cp GenericAgent.pm.dist GenericAgent.pm

# perl -cw /opt/otrs/bin/cgi-bin/index.pl
    /opt/otrs/bin/cgi-bin/index.pl syntax OK

# perl -cw /opt/otrs/bin/cgi-bin/customer.pl
    /opt/otrs/bin/cgi-bin/customer.pl syntax OK

# perl -cw /opt/otrs/bin/otrs.PostMaster.pl
    /opt/otrs/bin/otrs.PostMaster.pl syntax OK

# cd /opt/otrs/bin
# sudo ./otrs.SetPermissions.pl --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs

Apache Conf
# sudo cp -va /opt/otrs/scripts/apache2-httpd.include.conf /etc/apache2/sites-available/otrs
# cd /etc/apache2/sites-available/
# sudo chown root:root otrs
# sudo a2ensite otrs
# sudo service apache2 reload

Start in browser
http://localhost/otrs/install.pl

CRON Conf
# sudo su
# cd /opt/otrs/var/cron
for foo in *.dist; do cp $foo `basename $foo .dist`; done
# su otrs
# cd /opt/otrs/bin
# ./Cron.sh start

# crontab -l
 
Ubuntu 12.04,
OTRS 3.3.4
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Cron permissions

Post by jojo »

check the permissions (or run the otrs.SetPermissions.pl script (read the INSTALL file carefully!)
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Misirkov
Znuny newbie
Posts: 2
Joined: 06 Feb 2014, 14:53
Znuny Version: 3.2.8
Real Name: Radul
Company: SFA

Re: Cron permissions

Post by Misirkov »

jojo wrote:check the permissions (or run the otrs.SetPermissions.pl script (read the INSTALL file carefully!)
Thank you for fast reaction Jojo,
I successfully start "Cron.sh", what did I done:
my permissions look like:

Code: Select all

sudo ./otrs.SetPermissions.pl --otrs-user=otrs --web-user=otrs --otrs-group=www-data --web-group=www-data /opt/otrs
Strange but when I finish with "install.pl", I must start again "otrs.SetPermissions.pl", to be able to start successfully "Cron.sh start"
Ubuntu 12.04,
OTRS 3.3.4
Locked