Skip to main content

Perl script not creating file

Comments

5 comments

  • cPanelLauren
    Hello, Have you checked the Apache error logs for references to the script when attempting to execute it? By default they're located at: /usr/local/apache/logs/error_log
    0
  • MattGarner
    Hello, Have you checked the Apache error logs for references to the script when attempting to execute it? By default they're located at: /usr/local/apache/logs/error_log

    Hi Lauren, No entries in the error log by the looks of it.
    0
  • cPanelLauren
    Hi @MattGarner I did try this on a test server and found that through the browser I experienced the same behavior. The script executes without issue but does not create a file. I also found that running this via CLI as my user works without issue as well. I would assume if this is the same behavior you're exhibiting that the issue is in the coding of the script itself as there is no error output to the apache error logs that would indicate it was running incorrectly. You might also want to seek assistance with the creation of the script:
    0
  • MattGarner
    Hi @MattGarner I did try this on a test server and found that through the browser I experienced the same behavior. The script executes without issue but does not create a file. I also found that running this via CLI as my user works without issue as well. I would assume if this is the same behavior you're exhibiting that the issue is in the coding of the script itself as there is no error output to the apache error logs that would indicate it was running incorrectly. You might also want to seek assistance with the creation of the script:
    0
  • cPanelMichael
    I'm not all that clued up on Perl - Just trying to help someone out. But it seems it's a permissions problem as when the test folder is given 777 and then you try and run the script via the browser the file is then created owned by "nobody". I assume that it can't be dune without 777 or something on the lines of that? Or the code of the perl script is bad.

    Hi Matt, Can you verify if the Apache suexec module is installed? If so, you will see output like this: # rpm -qa|grep suexec ea-apache24-mod_suexec-2.4.33-4.4.2.cpanel.x86_64
    If not, try installing the suexec module to see if it makes a difference: yum install ea-apache24-mod_suexec
    Thank you.
    0

Please sign in to leave a comment.