Member Avatar

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.

Recommended Answers

All 2 Replies

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
commented: thanks +14
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.