View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000380 | bareos-core | installer / packages | public | 2014-12-19 18:14 | 2015-03-25 18:24 |
Reporter | joergs | Assigned To | |||
Priority | high | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | OS | any | OS Version | 3 |
Product Version | 14.2.2 | ||||
Fixed in Version | 14.2.2 | ||||
Summary | 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend on Debian systems, database permissions are not set correctly | ||||
Description | When the Bareos catalog has been created by /usr/lib/bareos/scripts/create_bareos_database it is owned by the user postres. If it is created automatically by dbconfig (Bareos >= 14.1), it is owned by the user "bareos". When migrating from earlier version to Bareos >= 14.1, the database is automatically updated, but the permissions for new tables is not set correct automatically. | ||||
Steps To Reproduce | Install bareos-13.2 with postgres backend, update to bareos-14.2 su - postres -c psql bareos \dt \dp | ||||
Additional Information | Workaround: run su postgres -c /usr/lib/bareos/scripts/grant_bareos_privileges after updates. | ||||
Tags | No tags attached. | ||||
Fix committed to bareos master branch with changesetid 2591. | |
Fix committed to bareos bareos-14.2 branch with changesetid 2609. | |
has been published with bareos >=14.2.2-46.1 | |
Fix committed to bareos2015 bareos-14.2 branch with changesetid 4486. | |
bareos: master 423c64e8 2014-12-20 13:44 Ported: N/A Details Diff |
Debian: fixes a problem when migrating to dbconfig The Bareos database maintenance scripts for the postgres backend create the Bareos database using the database administrator account and grant permission to the Bareos database user. When a Bareos update requires a database schema update, the user has to call update_bareos_tables and grant_bareos_privileges. When using dbconfig (Bareos >= 14.1), only update_bareos_tables is performed, as grant_bareos_privileges would require variable substitutions (db_name, db_user and db_password), which is not supported in dbconfig (dbc_sql_substitutions only works on installing, not on updates). Therefore it is necessary, that new tables are created as the Bareos database user, so it automatically has sufficient permissions. As the Bareos database user can not drop tables not created by himself, the drop statement must be executed as database administrator user. This patch implements this. The resuls to: Updating from Bareos < 14.1: database: owner postgres tables already existing before 14.1: owner postgres, permission to baroes tables created after 14.1: owner bareos Installing Bareos >= 14.1: database: owner bareos tables: owner bareos Fixes 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend, database permissions are not set correctly |
Affected Issues 0000380 |
|
mod - debian/bareos-database-common.config.in | Diff File | ||
mod - debian/bareos-database-common.postinst.in | Diff File | ||
mod - debian/bareos-database-mysql.install.in | Diff File | ||
mod - debian/bareos-database-postgresql.install.in | Diff File | ||
mod - debian/bareos-database-sqlite3.install.in | Diff File | ||
mod - platforms/debian/Makefile.in | Diff File | ||
bareos: bareos-14.2 10b8d968 2014-12-20 13:44 Ported: N/A Details Diff |
Debian: fixes a problem when migrating to dbconfig The Bareos database maintenance scripts for the postgres backend create the Bareos database using the database administrator account and grant permission to the Bareos database user. When a Bareos update requires a database schema update, the user has to call update_bareos_tables and grant_bareos_privileges. When using dbconfig (Bareos >= 14.1), only update_bareos_tables is performed, as grant_bareos_privileges would require variable substitutions (db_name, db_user and db_password), which is not supported in dbconfig (dbc_sql_substitutions only works on installing, not on updates). Therefore it is necessary, that new tables are created as the Bareos database user, so it automatically has sufficient permissions. As the Bareos database user can not drop tables not created by himself, the drop statement must be executed as database administrator user. This patch implements this. The resuls to: Updating from Bareos < 14.1: database: owner postgres tables already existing before 14.1: owner postgres, permission to baroes tables created after 14.1: owner bareos Installing Bareos >= 14.1: database: owner bareos tables: owner bareos Fixes 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend, database permissions are not set correctly |
Affected Issues 0000380 |
|
mod - debian/bareos-database-common.config.in | Diff File | ||
mod - debian/bareos-database-common.postinst.in | Diff File | ||
mod - debian/bareos-database-mysql.install.in | Diff File | ||
mod - debian/bareos-database-postgresql.install.in | Diff File | ||
mod - debian/bareos-database-sqlite3.install.in | Diff File | ||
mod - platforms/debian/Makefile.in | Diff File | ||
bareos2015: bareos-14.2 63080378 2014-12-20 14:44 Committer: mvwieringen Ported: N/A Details Diff |
Debian: fixes a problem when migrating to dbconfig The Bareos database maintenance scripts for the postgres backend create the Bareos database using the database administrator account and grant permission to the Bareos database user. When a Bareos update requires a database schema update, the user has to call update_bareos_tables and grant_bareos_privileges. When using dbconfig (Bareos >= 14.1), only update_bareos_tables is performed, as grant_bareos_privileges would require variable substitutions (db_name, db_user and db_password), which is not supported in dbconfig (dbc_sql_substitutions only works on installing, not on updates). Therefore it is necessary, that new tables are created as the Bareos database user, so it automatically has sufficient permissions. As the Bareos database user can not drop tables not created by himself, the drop statement must be executed as database administrator user. This patch implements this. The resuls to: Updating from Bareos < 14.1: database: owner postgres tables already existing before 14.1: owner postgres, permission to baroes tables created after 14.1: owner bareos Installing Bareos >= 14.1: database: owner bareos tables: owner bareos Fixes 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend, database permissions are not set correctly |
Affected Issues 0000380 |
|
mod - debian/bareos-database-common.config.in | Diff File | ||
mod - debian/bareos-database-common.postinst.in | Diff File | ||
mod - debian/bareos-database-mysql.install.in | Diff File | ||
mod - debian/bareos-database-postgresql.install.in | Diff File | ||
mod - debian/bareos-database-sqlite3.install.in | Diff File | ||
mod - platforms/debian/Makefile.in | Diff File | ||
bareos-docs: master acc7aa6d 2014-12-22 10:20 Ported: N/A Details Diff |
added hint about updating dbconfig and postgresql Issues 0000380: Debian: when migrating from 13.2 to 14.2 with postgres backend on Debian systems, database permissions are not set correctly |
Affected Issues 0000380 |
|
mod - manuals/en/main/catmaintenance.tex | Diff File | ||
mod - manuals/en/main/install.tex | Diff File |
Date Modified | Username | Field | Change |
---|---|---|---|
2014-12-19 18:14 | joergs | New Issue | |
2014-12-19 18:14 | joergs | Status | new => assigned |
2014-12-19 18:14 | joergs | Assigned To | => joergs |
2014-12-22 10:23 | joergs | Changeset attached | => bareos-docs master acc7aa6d |
2014-12-23 21:33 | joergs | Changeset attached | => bareos master 423c64e8 |
2014-12-23 21:33 | joergs | Note Added: 0001152 | |
2014-12-23 21:33 | joergs | Status | assigned => resolved |
2014-12-23 21:33 | joergs | Resolution | open => fixed |
2014-12-31 18:35 | joergs | Changeset attached | => bareos bareos-14.2 10b8d968 |
2014-12-31 18:35 | joergs | Note Added: 0001171 | |
2015-01-16 16:44 | joergs | Note Added: 0001191 | |
2015-01-16 16:44 | joergs | Status | resolved => closed |
2015-01-16 16:44 | joergs | Assigned To | joergs => |
2015-01-16 16:44 | joergs | Fixed in Version | => 14.2.2 |
2015-03-25 16:51 | mvwieringen | Changeset attached | => bareos2015 bareos-14.2 63080378 |
2015-03-25 16:51 | mvwieringen | Note Added: 0001449 | |
2015-03-25 16:51 | mvwieringen | Status | closed => resolved |
2015-03-25 18:24 | joergs | Status | resolved => closed |