Best value in

Frequently Asked Questions

  • Frequently Asked Questions

  • How should I set my file permissions on cgi-scripts?

    Executable via the web by anyone: chmod 755

    Executed by only yourself through the command line: chmod 700

    We run suEXEC seamlessly through the Apache web server. 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 that will open and write to the file is executed under userid of the owner 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 this directory will not execute.

    Updated: 08/12/02

  • Search entire site for:

    There is also an extensive online manual available.   888-404-HOST (toll-free US/PR/VI/GU), 706-897-4743