Loading ...
Sorry, an error occurred while loading the content.

Re: glob

Expand Messages
  • Damien Carbery
    ... is wrong) ... files ... script - ... I am assuming you mean what USER the script is running under $
    Message 1 of 2 , Oct 30, 2003
    • 0 Attachment
      --- In perl-beginner@yahoogroups.com, Gordon Stewart <gordon52@s...>
      wrote:
      > --- In perl-beginner@yahoogroups.com, merlyn@s... wrote:
      > > >>>>> "Gordon" == Gordon Stewart <gordon52@s...> writes:
      > >
      > > Gordon> $pa="/www/g/gorstew/cgi-bin/groups/$group/messages/*.txt";
      > > Gordon> @ary = glob($pa);
      > >
      > > Gordon> which works perfectly well...
      > >
      > > Gordon> - But the rest of the script continues as it should (however
      > there is no
      > > Gordon> info being gathered by the glob - so the resulting output
      is wrong)
      > > Gordon> but the script doesnt halt / stop in any way...
      > >
      > > Perhaps you didn't consider that the CGI script doesn't run as you,
      > > but as the web user. Does the web user have access to all the same
      > > directories that you do?
      > >
      >
      > I guess so..
      >
      > On the web - my scripts work fine - adding / deleting / appending to
      files
      > - for me - & other users...
      >
      > & same with my cron jobs - They log actions / Append / Create / delete
      > files....
      >
      > how do i test what the script is running under ?
      >
      > PS - Ive got ther same 2-3 lines in another module - of the same
      script -
      > Works perfectly fine (last time I checked..)
      >
      > Basically, the array will / should contain files - in a particular
      > directory as defined in a variable...
      > I've checked & the directories ARE correct ....
      >
      > G

      > how do i test what the script is running under ?
      I am assuming you mean 'what USER the script is running under'

      $< = $REAL_USER_ID = $UID
      The real user ID (UID) of this process i.e. what script is running as.
      £> = $EFFECTIVE_USER_ID = $EUID
      The effective uid of this process - this is different if the script is
      suid.
      $) = $REAL_GROUP_ID = $GID
      $( = $EFFECTIVE_GROUP_ID = $EGUID
      Similar to UID but gives group info.

      If you haven't done so already I recommend running your cron script at
      the command prompt (if possible) and adding loads of debug statements.
    Your message has been successfully submitted and would be delivered to recipients shortly.