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.

Backup process: open file denied at bin/pkgacct.pl line 1472

Discussion in 'Data Protection' started by bouvrie, Oct 18, 2016.

Tags:
  1. bouvrie

    bouvrie Active Member

    Joined:
    Apr 6, 2012
    Messages:
    28
    Likes Received:
    5
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    When backing up accounts, dirs/files not readable by the account's owner trigger the following warning in tar during archiving, effectively preventing them from being backed up:
    Code:
    One or more files in the home directory were not readable and were not copied.  Please review the home directory upon completion of transfer
    WARN: Warnings(s) encountered in tar during archiving:
    /home/user/public_html/googlea567f7859gfa8dc1.html: Cannot open file: Permission denied at bin/pkgacct.pl line 1472.
    /home/user/public_html/.well-known: Cannot open file: Permission denied at bin/pkgacct.pl line 1472.
    /home/user/public_html/.htpasswds: Cannot open file: Permission denied at bin/pkgacct.pl line 1472.
    /home/user/public_html/assets/uploads/index.php: Cannot open file: Permission denied at bin/pkgacct.pl line 1472.
    Done
    Naturally, the files/dirs in question are not excluded by means of the cpbackup-exclude.conf file.

    I'd assume that a back-up should create a backup of the complete homedir, rather than limited to the files effectively accessible to the user?​
     
  2. cPanelJimmy

    cPanelJimmy Technical Analyst Supervisor
    Staff Member

    Joined:
    Jun 11, 2014
    Messages:
    14
    Likes Received:
    1
    Trophy Points:
    3
    Hello,

    This is happening because the user doesn't have access to these files. The backup/account packaging process runs as the user so without access to those files it will show that warning and skip over them.

    Generally all files (and folders) within the public_html directory should be owned by the user and it's group should be of the user too. An example:

    Code:
    [root@server1.myserver /home/myuser/public_html]# ls -la
    total 136
    drwxr-x--- 13 myuser nobody  4096 Jun 20 21:00 ./
    drwx--x--x 26 myuser myuser  4096 Oct 19 02:01 ../
    -rw-r--r--  1 myuser myuser  1058 Aug 15 20:57 about.php
    -rw-r--r--  1 myuser myuser  3200 Jul 25  2015 file1.php
    -rw-r--r--  1 myuser myuser  1445 Jul 25  2015 file2.php
    You can use the cPanel File Manager, an FTP client or SSH to review and adjust the permissions on the file.

    Please don't hesitate to write back if you should have any further issues!

    Thanks,
     
Loading...

Share This Page