Forums / Cotonti / Core Labs / Ideas / Move configuration files to cfg folder

And leave datas for runtime-generated files only

Trustmaster
#31776 2011-12-02 16:27

Currently we have (basicly) 3 executable PHP files in datas folder: config.php, extensions.php and mimetype.php. The rest of datas contents is user files, uploads and temporary files.

There is a proposal in the community to put configuration files into a separate root folder named 'cfg'. The reasoning behind such a measure is:

  1. It is more logical to keep configuration apart from user-generated contents.
  2. It would simplify security/rights management in datas. You could just make the enitre folder writeable recursively. What's more, it would be possible to disallow PHP execution in datas (at least with Apache) which would improve security.

The downside is backwards compatibility. Despite path to config.php is hardcoded, it is quite easy to replace massively. But the files should be moved to a new folder manually on existing sites because install.php isn't likely to have enough permissions.

Post here what you think and some alternative solutions.

May the Source be with you!