Hey guys,

At the moment more for convenience I'm giving my codeigniter files recursive 777 permissions which is bad. I'm still in the development stage so it is not an issue. But upon release for a production environment what is the best practice for the permission of the files.

Specifically the config directory.

Thanks in advance.

4 Years
Discussion Span
Last Post by iamthwee

most webhost recommends 755 for the directories and all files are defaulted at 655, except for files where writing is needed.

on servers that are still running on apache module as server API, they normally have 777 to be able write and this is also true as default on all directories. For the latest servers with fast CGI as server API, they did lower down the writtable to 755 and 655 for the files.

For some scripts and files like video encoders and static ffmpeg for linux, these files are dangerously CHMODed at 777, because of the exec requirements during the video encoding process, but then these files are protected by .htaccess file.

something like this, very simple protection for the encoder.module

<Files *.module>
deny from all
Votes + Comments


I've read somewhere that the folders need 755 and my php files need 655. Upload folders need 777.

What would be the best way in the terminal to apply these file permissions?

Also, veedeo can you take a look at my other thread


Edited by iamthwee

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.