http://qs321.pair.com?node_id=48863


in reply to (zdog) Re: Find the permission problem
in thread Find the permission problem

Tried it just now, no effect. $?==9728 $?>>8==38

tye Giving it a straight string System("/dirstruct/dirstruct2/cgi-bin/subdir/progname static_argument_value"); produced the same effect.

i0cgi-bin's permissions are "root html rwxrwxr-x" cgi-bin/subdir's are "wombat apache rwxrwxr-x" the program I'm trying to run is "wombat wombat rwxr--r-x" and the target app is "wombat apache rwx--x--x"

Replies are listed 'Best First'.
Re: Re: Re: Find the permission problem
by Fastolfe (Vicar) on Dec 30, 2000 at 03:47 UTC
    rwx--x--x is a bad set of permissions for a Perl script (assuming that's what it is). Scripts need to be read and interpreted by an interpreter, which means the script needs to be readable to the interpreter. If your script is owned by yourself, but merely executable by the user running the interpreter (apache?), it won't be able to read the script and will fail.

    Try setting the permissions to something more sane, like 755, and see if that helps.

    In addition, if you're frequently executing one Perl script from within others, you may be interested in breaking that Perl script out into a module, and simply 'use' that module from your other Perl scripts that need to get at that common code.

(zdog) Re: (3) Find the permission problem
by zdog (Priest) on Dec 29, 2000 at 22:58 UTC
    If you need the variables: you can always do: system("$command $arg");

    or

    my $cmd = "$command $arg"; system($cmd);

    Zenon Zabinski | zdog | Zenon.Zabinski03@students.bcp.org