www-data needs to own Django DB

The Django database (summit.db) and directory need to be owned
by www-data instead of odsreg, otherwise the app can't run.

Change-Id: Ic1b25990f85701d64cf3af6e3eafbfa9eb9d2c93
This commit is contained in:
Thierry Carrez 2015-09-18 16:22:43 +02:00
parent de09adabf3
commit 5c70083eb1
1 changed files with 4 additions and 6 deletions

View File

@ -51,9 +51,7 @@ class odsreg(
file { '/var/lib/odsreg':
ensure => directory,
mode => '0755',
owner => 'odsreg',
group => 'odsreg',
require => User['odsreg'],
owner => 'www-data',
}
# a plain git checkout
@ -87,7 +85,7 @@ class odsreg(
}
exec { 'odsreg_sync_db':
user => 'odsreg',
user => 'www-data',
command => 'python /usr/local/odsreg/odsreg/manage.py syncdb --noinput',
cwd => '/usr/local/odsreg',
path => '/bin:/usr/bin',