in reply to Problem while displaying dynamic data on perl CGI pages

When you run the script through Apache, it will run as a different user ID than you are (presumably) using on the command line. Are you sure that the user ID that Apache uses has the proper access to that file. For instance on Ubuntu, Apache runs as user www-data: does user www-data have access to the file?
  • Comment on Re: Problem while displaying dynamic data on perl CGI pages

Replies are listed 'Best First'.
Re^2: Problem while displaying dynamic data on perl CGI pages
by ramesh_ps1 (Initiate) on Jun 01, 2007 at 12:17 UTC
    Files are created under roor:root but the file permissions ar set to 755.
    Do I need to change the owner:group of the files?
      Hi,
      Changed the file owner and it started working.
      Thanks for the tip.

        Are you sure that the files and directories up to the location of the file were root:root 755? I seldom have code owned by the same ID as what is running it -- one more layer of the onion that a "baddie" needs to get through to modify stuff. If the web user need to write a file I will of

        If changing the ownership to the same as the user the web server is running as solved your problem, I would suggest that the permissions on the file were not set to 755, or you have your web server configured to deny access to scripts not owned by the web server user.

        Update:Struck out confusing typo, incomplete thought

        --MidLifeXis