Re: Perl Script from CronJob Rights Problem

From: /dev/null (bit_char_g_at_gmx.net)
Date: 10/19/03

  • Next message: Mike Oliver: "Re: Buying new mobo/CPU"
    Date: 18 Oct 2003 22:47:08 -0700
    
    

    Paul Lutus <nospam@nosite.zzz> wrote in message news:<vp39ca78guard2@corp.supernews.com>...
    > /dev/null wrote:
    >
    > > Hi,
    > >
    > > i wrote this little perl script that checks the mail queue of postfix,
    > > determines which mails are older than two days and deletes them from
    > > the queue using 'postsuper -d'.
    > > When i execute that script being logged in as root it works perfectly,
    > > but when it gets executed by Cron there seem to be some rights
    > > problems.
    > > Since i added it to the root Cron, i assume it is executed with root
    > > rights, so i do not understand the problem.
    >
    > No script. No cron entry. No nothing. No help.

    Sorry for that lack of information.

    cron entry:
    03 03 1-31 * * /usr/bin/perl /root/del_2_days_old_mail.pl >
    /root/mail_deleting.log

    It get`s executed, as i can tell from looking at the log file

    script deleting part:
    my $delete = system("postsuper -d $mail_id 1>&2>
    /root/postsuper.error.log");

    I thought this would pipe the output of postsuper to the error log
    file, but unfortunately it doesnt work.

    Thanks again and sorry, for the missing necessary information before.

    Greets


  • Next message: Mike Oliver: "Re: Buying new mobo/CPU"

    Relevant Pages

    • Re: Will Linux become as vulnerable as MS ??
      ... > beeing vulnerable to viruses. ... > that they know are executable, and execute intentionally. ... >> Linux, each distro is a little different, and even within the distro, ... > Since clicking on a script is easier than typing it's name, ...
      (comp.os.linux.security)
    • Re: [Full-Disclosure] ColdFusion cross-site scripting security vulnerability of an error page
      ... > execute the arbitrary javascript and HTML code which the attacker ... > It is possible to display the contents transmitted from the client ... > cross-site scripting attack can be executed. ... the script will be executed when the script for an attack ...
      (Full-Disclosure)
    • CGIscript.net - csMailto.cgi - Remote Command Execution
      ... CGIscript.net - csMailto.cgi - Remote Command ... csMailto is a perl cgi formmail script developed by ... execute command on server and mail output to anyone ...
      (Bugtraq)
    • Re: Extracting data from an XML to put into a constant
      ... ExecuteGlobal "Const cnUB = 9" ... The following script causes the same error. ... Ordinary variables and constants defined with execute statements have ... no value until their defining statement is executed at run time. ...
      (microsoft.public.scripting.vbscript)
    • Re: HTTPContext Session and worker thread (Fire and Forget)
      ... Once the page is loaded on the client side, make the request via script ... To kick of the job you insert record into tblJobs with MessageIn having ... not execute job cause it was grabbed by other pooling thread between step 1 ...
      (microsoft.public.dotnet.framework.aspnet)