What permissions do I need to set CGI scripts to?

Files and directories within your cgi-bin directory (or CGI scripts elsewhere) should be set to 755, that is:

rwx r-x r-x (chmod 755)

Since the Perl script that 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. This protects the security of our servers and your website and database(s).

Some Perl scripts which may require you to set a directory to rwxrwxrwx (chmod 777). This is not necessary as 777 is disallowed on our servers - 755 should always be sufficient even if 777 is recommended.

  • 111 Users Found This Useful
Was this answer helpful?

Related Articles

How do I set permissions on files and scripts?

Doing a CHMOD (changing a file's permissions) is the setting of access privileges for a file....

What is the path to perl?

/usr/bin/perlYou can also find information on paths to other useful programs by logging in to...

How do I connect to my MySQL database from a Perl CGI script?

Perl's DBI module provides an interface to MySQL databases for CGI scripts. A commented example...

Is PHP a CGI or Apache module?

PHP runs as a cgi at Fast-name – this is because it is more secure than running it as an Apache...

Does Fast-name support Image::Magick?

Yes we do, and in case you need to know the exact version number, at the time of writing, the...

Powered by WHMCompleteSolution