December 2, 2008

The “Permission Denied” Error

Filed under: Errors and Bugs — Oscar Godson @ 11:36 pm

It will now (version 1.3.1) change the permissions automatically with the chmod() function.

One user (possibly more?) had an issue installing this, which is my fault for not providing better documentation on how Deploy* works (I have added an install.txt file in Deploy* 1.3.1), however, that is another post. The error will read something like:

warning: mkdir() [function.mkdir]: permission denied in /home/user/public_html/mydeploy/deploy.php on line 138

warning: fopen(deploy_231202302/index.html) [function.fopen]: failed to open stream: no such file or directory in /home/user/public_html/mydeploy/deploy.php on line 298

To fix this is quite simple and I have been able to recreate it and fix it with ease. Set BOTH the “deploys” directory (a child directory of the root directory where all deploys are stored) AND the root directory, which in the example above would be “mydeploy” to 755 permission.

If you want help on changing permissions please consult your FTP’s user guide or if you are doing this without an FTP (like using MAMP on Mac OS X) consult with your OS user guide on file permissions.

For Transmit users, like myself:

  • Right click on the directory you want to change the permissions of
  • Click “Get Info”
  • Type in 755 in the “octal” input
  • Press “Apply”

This will be pretty close to most FTP applications and remember you can use your FTP application to browse your local HDD and change file permissions just like you are on a server.

1.3.1 now catches this error and provides an error message of it’s own if this happens.

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment