Cakephp: SQLite mode or mask

Created on 7 Jul 2017  路  3Comments  路  Source: cakephp/cakephp

This is a (multiple allowed):

  • [ ] bug
  • [x] enhancement
  • [ ] feature-discussion (RFC)

  • CakePHP Version: 3.4.x

  • Platform and Target: All.

What you did

using SQLite databases

What happened

DebugKit SQLite file is in 0644 mode and can't be writed by my group

What you expected to happen

Bases PHP function and method (sqlite_open or SQLite3::_construct()) have a "mode" option to fix the database file mode

PDO can't do that.

I propose a new option in ConnectionManager config for "SQLite" called "mask".
In CakeDatabaseDriverSqlite::connect(), test if file exist first, if not, flag it and chmod the created file with mask if $options['mask'] is set

database enhancement

Most helpful comment

i'll try to do that, i already have another issue to PR too ;)

All 3 comments

Sounds like a great idea. Any chance you'd be willing to open a pull request with the changes you think should be done?

i'll try to do that, i already have another issue to PR too ;)

Closing as a pull request is open now.

Was this page helpful?
0 / 5 - 0 ratings