Backup (pkgacct) as non-root user

Jason Bernier

Registered
Jun 12, 2016
4
1
3
New England
cPanel Access Level
Root Administrator
Hello there.

I'm able to manually administrate my backups using /scripts/pkgacct, however, I'd like to use a non-root user to do this without the need to sudo.

Is there a group or permission I can assign to my "newuser" to allow the use of "/scripts/pkgacct" ?

Thanks!
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,228
463
Hello,

The pkgacct script requires root access due to the privileges required to generate a backup of the account. Documentation on this script is available at:

Pkgacct script

One workaround is to utilize an API function, however note that no comparable functions with cPanel API 2 or UAPI match the functionality in the Fileman::fullbackup cPanel API 1 function:

cPanel API 1 Functions - Fileman::FullBackup

There's a user-submitted workaround that's discussed on the following thread:

Backing up accounts (hacky way)

While cPanel API 1 is deprecated, there are no plans to remove this API call until a comparable UAPI call is implemented. I encourage you to vote and add feedback to this feature request:

Ability to create a full backup in cPanel API 2

Thank you.
 

Infopro

Well-Known Member
May 20, 2003
17,091
516
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter