The Movable Type Knowledge Base

My PHP Output Files Need To Be Executable

Question

My webserver requires that the permissions on my .php files be set to 755, but the files Movable Type generates have permissions set to 666.

Answer

The permissions on files created by Movable Type are determined by the HTMLPerms configuration default, which is 666. You can override this default in mt-config.cgi1:

# HTMLPerms 0777

If you uncomment this setting2 in the file, default permissions for all files created by the system will then be set to 777.

Note that the setting for HTMLPerms will be adjusted by the the HTMLUmask setting in mt-config.cgi. The default for HTMLUmask is 0111, so you should take this into consideration when setting HTMLPerms.

For example, if you have set HTMLPerms to 0777, you should set HTMLUmask to 0022, so that all files created by the system will have permissions of 0755.

1 In versions prior to 3.2, the configuration file is named mt.cfg.

2 To uncomment a setting means to remove the # from the beginning of the line where it appears.

Submit Feedback on This Article

Your comments on how we can improve this article are appreciated; but please do not use the feedback form to submit support requests or questions. We will not respond to or publish such queries submitted through this form. If you have a technical question or problem, visit Movable Type Support.

Yahoo! Small Business web hosting services

Six Apart
Makers of weblog software and services for individuals, organizations and businesses.
This website is powered by Movable Type.