Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Archive::Zip errors

by fluffyvoidwarrior (Monk)
on Nov 04, 2005 at 08:13 UTC ( #505640=note: print w/replies, xml ) Need Help??


in reply to Re: Archive::Zip errors
in thread Archive::Zip errors

No, no zip files at all in target folder.

Replies are listed 'Best First'.
Re^3: Archive::Zip errors
by virtualsue (Vicar) on Nov 04, 2005 at 09:25 UTC
    Then is this statement from your original post correct?

    All my other cgi scripts happily write to these folders but archive::zip won't

    Are you *sure* that www:apache can create files in the /delme/ directory?

      Just added :
      open(WOBBLE, ">/delme/flunk.txt"); print WOBBLE "Bugger!"; close(WOBBLE);
      to my cgi script and you're right apache wont write to the /delme directory. However, I then tested it on my actual real life directory with this code
      open(WOBBLE, ">/caralan_com/system/proofing/cam_proofs/steve/live/fl +unk.txt"); print WOBBLE "Bugger!"; close(WOBBLE);
      and the file is created as expected. It sounds like I have my permissions set wrong and that perhaps archive::zip is less forgiving than apache. I'll try opening my permissions and owner to something totally public all along that path and see what happens.
        I have not seen anything yet which indicates that this problem has anything to do with Archive::Zip. What is important here is the fact that your CGI scripts run as www, so the www user must have write permission in the locations specified in your scripts.

        You will make your life easier as well as more secure if you set up a development environment which has the same underlying directory structure & permissions as your target production environment, rather than writing test files in random places on your hard drive. :)

        It sounds like I have my permissions set wrong and that perhaps archive::zip is less forgiving than apache. I'll try opening my permissions and owner to something totally public all along that path and see what happens.

        Well, you're getting *very* close. Archive::Zip has nothing to do with permissions directly. I'm almost postive that what you're missing is that apache runs on one user account, that quite likely has slightly different permissions than your login user account.

        When you execute a CGI manually, you're running as *you*. Meanwhile, when one is called via the Apache daemon, it's running as (apache|httpd|etc.).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://505640]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (4)
As of 2018-02-22 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    When it is dark outside I am happiest to see ...














    Results (288 votes). Check out past polls.

    Notices?