Fixes: #2554
- Update permissions on the backups-data directory so that files are only
accessible by root users.
- Ensure that the directory is created by the 'backups' app and not by each of
the apps that take the backup.
Tests:
- Run functional tests for miniflux, dynamicdns, wordpress, zoph, and nextlcoud.
There was an unrelated functional test case failure in nextcloud.
- On a fresh installation, apply patch. Service is restarted. The directory is
created with proper permissions and ownership.
- On a fresh installation, without the patch. Backup the dynamicdns app. The
directory is created with incorrect permissions. Apply the patch. Service is
restarted. Proper permissions are set on the directory.
- On a setup with incorrect permissions, re-run backups app's setup. The
permissions are updated correctly.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
- This is to capture stdout and stderr and transmit that from privileged daemon
back to the service to be displayed in HTML.
Tests:
- Unit tests and code checks pass.
- Some of the modified actions work as expected.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Veiko Aasa <veiko17@disroot.org>
- Overlooked in !2454.
Tests:
- Take a backup of wordpress app and disable it. Restore from the backup
succeeds after that.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Tests:
- Install zoph and disable it. This will install mysql and disable it. Then
install wordpress. Installation should succeed.
- Disable wordpress and re-run setup. Setup should succeed.
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
* When app is uninstalled, remove config files and drop the database
* Declare PUBLIC_ACCESS_FILE with pathlib.Path
* Add public access file to the backup manifest
Tests:
1. Install and setup wordpress
2. Reinstall the app and confirm that the initial setup page is shown to the user
3. Functional tests passed
Signed-off-by: nbenedek <contact@nbenedek.me>
[sunil: Update docstrings, minor refactoring]
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
Tests:
- Functional tests work (when libpam-tmpdir is removed)
- Backup and restore of database works
- Initial setup work
- Configuration file is created
- Database is created
- Website is accessible
- Enabling/disabling public access works
- Configuration file created/deleted
- App page show proper status
Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>