We have configured cPanel Backups, however there are a number of accounts that are not being removed. The system is creating the backup but when the retention policy is run against the files, some of the account are not being removed due to a permission error on the backup.
This is not happening for all accounts but over the time there were enough accounts that filled up our backup Repository and backups began failing. After a manual purge, we we able to manage the logs and see the cause.
The process is having permissions issues with a directory or file and this is leaving the folder behind.
One account is throwing the following error:
cannot chdir to child for /mnt/backup/2021-12-16/accounts/USER_DOMAIN/homedir/public_ftp: Permission denied at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts/USER_DOMAIN/homedir: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts/USER_DOMAIN: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
And since the backups was able to create the folder, i am not sure where to look to see why it is prevented from removing.
Thanks
This is not happening for all accounts but over the time there were enough accounts that filled up our backup Repository and backups began failing. After a manual purge, we we able to manage the logs and see the cause.
The process is having permissions issues with a directory or file and this is leaving the folder behind.
One account is throwing the following error:
cannot chdir to child for /mnt/backup/2021-12-16/accounts/USER_DOMAIN/homedir/public_ftp: Permission denied at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts/USER_DOMAIN/homedir: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts/USER_DOMAIN: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16/accounts: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
cannot remove directory for /mnt/backup/2021-12-16: Directory not empty at /usr/local/cpanel/bin/backup line 2041.
And since the backups was able to create the folder, i am not sure where to look to see why it is prevented from removing.
Thanks