Hosting FAQs
  • F.A.Q: Common Problems/Questions

    Common problems and questions that you may have.


    5. How Should I set my file permissions on cgi-scripts? - Top

    Executed via the web by anyone: chmod 755
    Executed by only yourself throught the command line: 700

    We run suEXEC seemlessly through the apache webserver.

    This effects how file permissions are set. This automatically makes the rwxrwxrwx error when applied to file permissions. Perl scripts will never work if the permissions on the file are 777.

    Files that would otherwise require world write access (guestbook pages) do not have to have this permission. Since the Perl script which will open and write to the file is executed under the owner's userid, and the file is also owned by the same user, then the file only needs to be writable by the owner, not the world.

    Finally, there are some freeware or perhaps even commercial Perl scripts which may require you to set a directory to rwxrwxrwx (chmod 777). Again, this is not necessary. Setting the directory permissions to 755 should always be sufficient. If you do set any directories to rwxrwxrwx, then any Perl scripts located inside of this directory will not execute!

    - Updated: March 23, 2000

    [e-Mail me the FAQs]  -   [Search our FAQs]  -   [Question Not Answered?]