mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-03-08 04:48:10 +00:00
fix(powerdns): fix SQLite directory permissions for pdns user
The /opt/poweradmin/ directory was owned by www-data:www-data (755), but pdns runs as the 'pdns' user which had no write access to the directory. SQLite requires write access to the database directory to create journal/WAL files (powerdns.db-journal, powerdns.db-wal). Without this, pdns fails to start. Changes: - Set directory group to 'pdns' instead of 'www-data' so pdns user can create SQLite journal/WAL files (via group write 775) - Apply same permissions fix in update_script (ct/powerdns.sh) - Fix msg_info -> msg_ok for 'Created Service' completion message Fixes #12572
This commit is contained in:
@@ -47,7 +47,10 @@ function update_script() {
|
||||
cp /opt/poweradmin_powerdns.db.bak /opt/poweradmin/powerdns.db
|
||||
rm -rf /opt/poweradmin/install
|
||||
rm -f /opt/poweradmin_settings.php.bak /opt/poweradmin_powerdns.db.bak
|
||||
chown -R www-data:www-data /opt/poweradmin
|
||||
chown -R www-data:pdns /opt/poweradmin
|
||||
chmod 775 /opt/poweradmin
|
||||
chown pdns:pdns /opt/poweradmin/powerdns.db
|
||||
chmod 664 /opt/poweradmin/powerdns.db
|
||||
msg_ok "Updated Poweradmin"
|
||||
|
||||
msg_info "Restarting Services"
|
||||
|
||||
@@ -131,12 +131,13 @@ cat <<EOF >/etc/apache2/sites-enabled/poweradmin.conf
|
||||
</VirtualHost>
|
||||
EOF
|
||||
$STD a2enmod rewrite headers
|
||||
chown -R www-data:www-data /opt/poweradmin
|
||||
chown -R www-data:pdns /opt/poweradmin
|
||||
chmod 775 /opt/poweradmin
|
||||
chown pdns:pdns /opt/poweradmin/powerdns.db
|
||||
chmod 664 /opt/poweradmin/powerdns.db
|
||||
usermod -aG pdns www-data
|
||||
$STD systemctl restart pdns apache2
|
||||
msg_info "Created Service"
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
Reference in New Issue
Block a user