Permission denied when using backup_manifest with ssgbackup.sh
search cancel

Permission denied when using backup_manifest with ssgbackup.sh

book

Article ID: 369844

calendar_today

Updated On:

Products

CA API Gateway

Issue/Introduction

When creating backups for the API Gateway virtual appliance according  the techdocs 

https://techdocs.broadcom.com/us/en/ca-enterprise-software/layer7-api-management/api-gateway/11-0/administer-the-gateway/back-up-gateways.html

Starting with Gateway 11 OS Files  Must Now Be Explicitly Declared in Backup Manifest for Gateways Running on Debian.

This also includes network interface configurations and the files added to  /etc/NetworkManager/system-connections/ directory .

There is an issue as ssgbackup.sh can be started as root, but the script does an 'su' to the layer7 user which does not have rights to the files

Adding the interface files results in a failing the ssgbackup.sh script on ‘os’ component.

]# /opt/SecureSpan/Gateway/config/backup/ssgbackup.sh -image /opt/SecureSpan/Gateway/config/backup/images/backup.zip

Backup of Gateway image partially succeeded.
Failed component: os

Log shows: 

INFO:   Copying file '/etc/NetworkManager/system-connections/Wired connection 1.nmconnection' to '/tmp/ssg_backup_restore3035872869129559640tmp/os/etc/NetworkManager/system-connections/Wired connection 1.nmconnection'
Jun 11, 2024 4:04:23 PM com.l7tech.gateway.config.backuprestore.ImportExportUtilities a
WARNING:        Component 'os' could not be backed up: Could not back up os configuration files: /etc/NetworkManager/system-connections/Wired connection 1.nmconnection (Permission denied)

Environment

GW 11.x

Resolution

The additional OS files should be added in quote's when there are spaces in the filename or path.

See example below for the backup_manifest file.

# should not be edited unless instructed to
# -----------------------------------------------------------------------------
/etc/resolv.conf
'/etc/NetworkManager/system-connections/Wired connection 2.nmconnection'