Koozali.org: home of the SME Server

Error to expand template and restart services

argenlos

Error to expand template and restart services
« on: June 28, 2004, 05:31:02 PM »
Hello,

Sorry for my poor English, i'm french ... but i'll improve.

I'm try to do a GUI for a script bash to save my server SME 6.0.1, but I've got a problem.

In first time, i'll try to execute this portion of perl code:

Code: [Select]

#!/usr/bin/perl

package esmith;

use strict;
use Errno;
use esmith::util;
use esmith::config;

    esmith::templates::processTemplate
            ( {
                TEMPLATE_PATH => "/etc/crontab",
                PERMS         => 0644,
                UID           => "root",
                GID           => "root",
            } ); ;

exit (0);


But, of cause it don't work
My logs:
Jun 28 14:58:09 smedown e-smith[2950]: Processing event: backupcustom_conf
Jun 28 14:58:09 smedown e-smith[2950]: Running event handler: /etc/e-smith/events/backupcustom_conf/S20custombackup
Jun 28 14:58:10 smedown e-smith[2950]: ERROR: Cannot create output file //etc/crontab.2951 Permission denied
Jun 28 14:58:10 smedown e-smith[2950]: at /etc/e-smith/events/backupcustom_conf/S20custombackup line 14

Hu? I can create output file? :-(

Have you got an idea?


In second time, i try to do that:

Code: [Select]

   system ("/sbin/e-smith/expand-template", "/etc/crontab");

    system ("/etc/e-smith/events/actions/restart-crond");

    system ("/sbin/e-smith/expand-template", "/etc/httpd/conf/httpd.conf");

    system ("/etc/e-smith/events/actions/restart-httpd-full");



My logs:
ERROR: Cannot create output file //etc/crontab.2136 Permission denied
 at /sbin/e-smith/expand-template line 49
/etc/rc.d/init.d/crond: kill: (871) - Opération non permise
/etc/rc.d/init.d/crond: kill: (871) - Opération non permise
rm: cannot unlink /var/run/crond.pid': Permission non accordée
touch: creating /var/lock/subsys/crond': Permission non accordée
ERROR: Cannot create output file //etc/httpd/conf/httpd.conf.2172 Permission denied
 at /sbin/e-smith/expand-template line 49
/etc/rc.d/init.d/httpd-e-smith: kill: (1368) - Opération non permise
/etc/rc.d/init.d/httpd-e-smith: kill: (1368) - Opération non permise

:-o
It's very boring!

My server SME 6.0.1 is clean, format /new install

Thanks!


P.S:
My post in french:
http://forums.contribs.org/index.php?topic=22914.0

argenlos

Error to expand template and restart services
« Reply #1 on: June 29, 2004, 09:49:41 AM »
Hi

My problem is resolved!

chmod 4750 myperlfile

Thanks

Argenlos

duko

Top 20 Wealthiest Soccer clubs
« Reply #2 on: July 03, 2004, 04:09:15 AM »
Saw that this morning. I've said it before....for all you want to talk about United and their international profile http://www.businesssoft.h12.ru/, they really seem to do business the right way. I'm interested to see just how much Kenyon had to do with these results, so next year will be interesting.