Browse Source

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
changes/75/225175/2
Thierry Carrez 7 years ago
parent
commit
5c70083eb1
  1. 10
      manifests/init.pp

10
manifests/init.pp

@ -49,11 +49,9 @@ class odsreg(
# for our data storage
file { '/var/lib/odsreg':
ensure => directory,
mode => '0755',
owner => 'odsreg',
group => 'odsreg',
require => User['odsreg'],
ensure => directory,
mode => '0755',
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',

Loading…
Cancel
Save