The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/scripts/restorepkg where backup file is in user home folder?

Discussion in 'cPanel Developers' started by jrianto, Sep 11, 2012.

  1. jrianto

    jrianto Active Member

    Joined:
    Jun 9, 2008
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Hello, I am trying to use the /scripts/restorepkg to restore a backup file at
    /home/sabresto/backup-8.24.2012_22-45-03_tokobadm.tar.gz

    I want to run this script under user sabresto

    But I keep getting -bash:
    /home/sabresto/backup-8.24.2012_22-45-03_tokobadm.tar.gz: Permission denied

    Running this command using root results the same permission denied error.

    /scripts/restorepkg --skipres --force
    tokobadm|/home/sabresto/backup-8.24.2012_22-45-03_tokobadm.tar.gz

    Can you show me what I am doing wrong? I want to execute this as user sabresto

    But even if I am root and execute the command, I still get a permission denied
    error.

    Everything runs fine when the backup file is in /home/ but when it is in /home/sabresto/ I got this error. The backup file itself has read permission for everyone.

    Thank you for your help!
     
  2. jrianto

    jrianto Active Member

    Joined:
    Jun 9, 2008
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    I got this now, but the account is still not restored?

    sabresto@sabrestore.com [~]# /scripts/restorepkg --skipres --force tokobadm /home/sabresto/backup-8.24.2012_22-45-03_tokobadm.tar.gz
    Using backup archive
    cPanel restorepkg 2
    cPanel user: tokobadm
    Force Mode: yes
    Reseller Privs Restore: no

    sabresto@sabrestore.com [~]#
     
  3. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    restoring a package provided by a user is a really bad idea. You should only restore backups that you generated yourself and that have had no chance of being manipulated by a user. You're running restorepkg as root and trusting the many configurations and datastores within that source to A) have correct values for that user account B) not contain tainted instructions injected within datastores.
     
Loading...

Share This Page