Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Re: Re: Stupid newbie question - perl/cgi

by mt2k (Hermit)
on Apr 04, 2002 at 05:34 UTC ( [id://156576]=note: print w/replies, xml ) Need Help??


in reply to Re: Re: Stupid newbie question - perl/cgi
in thread perl/cgi question: script works from unix command line, but not web page

Aha, there is a reason, however, why I suggested 0777 as the permission for scripts.
The server I am working on is setup in a bad way.
Whatever permissions are set for the script are the same permissions my scripts are granted for files.

If I chmod the script 0755, then my script can read and execute files, but it cannot write to files!!
If I chmod it to 0777 it can read, execute, and write to/from files.

This is a very strange behaviour, but it is how the server I am on works. So to be able to write to files, I HAVE to chmod my scripts to 0777.

Replies are listed 'Best First'.
Re: Re: Re: Re: Stupid newbie question - perl/cgi
by Juerd (Abbot) on Apr 04, 2002 at 05:45 UTC

    So to be able to write to files, I HAVE to chmod my scripts to 0777.

    I would have refused to work with such crap. If any other user on the machine, and badly set up machines tend to have a lot of users, adds system qw(rm -rf), $ENV{HOME}; to your script, you will be fried on its first run.

    U28geW91IGNhbiBhbGwgcm90MTMgY
    W5kIHBhY2soKS4gQnV0IGRvIHlvdS
    ByZWNvZ25pc2UgQmFzZTY0IHdoZW4
    geW91IHNlZSBpdD8gIC0tIEp1ZXJk
    

      That is the strange part I believe.

      The actual user directory is chmoded differently, so that access to the www-root directory is inaccessible. Meaning that they could not edit should they want to. Sure, the file itself is 0777, but the parent directory is 0722 or something less.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://156576]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (5)
As of 2024-03-29 14:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found