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.

Fatal Error on re-upload emailforwarders

Discussion in 'E-mail Discussions' started by agbkorf, Apr 17, 2014.

  1. agbkorf

    agbkorf Registered

    Joined:
    Apr 17, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I receive a reproducible fatal error while trying to restore emailforwarders.

    steps to produce error:
    1. download forwarders ==> creates file on PC "aliases-domain.com.gz"
    2. dowload forwarders second time ==> creates file with added " (1)" like "aliases-domain (1).com.gz"
    3. selecting file "aliases-domain.com.gz" and uploading gives NO error
    4. selecting file "aliases-domain (1).com.gz" and uploading gives fatal error

    NB:
    1. The fatal error occurs on existing accounts AND newly created cPanel accounts
    2. I am certain I was able and have done this in the past without errors.

    Urgency: LOW, for the work-around is to clear the download directory first or to rename the file and remove the " (1)" part in the filename.

    This is the error:
    [a fatal error or timeout occurred while processing this directive]

    When I click the error:
    Code:
    /etc/valiases/aliases-domain (4).com open failed: Permission denied at cpanel line 3287
    	Carp::croak('/etc/valiases/aliases-domain (4).com open failed: Permission den...') called at /usr/local/cpanel/Cpanel/Backups.pm line 233
    	Cpanel::Backups::restoreaf('dir', '/home/farikoc', 'file-aliases-domain (4).com.gz-key', 'file4', 'file-aliases-domain (4).com.gz', '/home/farikoc/tmp/Cpanel_Form_file.upload._0D20zhypPFgUOxn', '') called at cpanel line 3287
    	main::dofileman('restoreaf', 'ARRAY(0x7fe5887ea930)') called at cpanel line 1904
    	eval {...} called at cpanel line 1904
    	main::_api1('Fileman', 'fileman', 'restoreaf()', 'restoreaf', 'ARRAY(0x7fe5887ea930)', 'safe_html_encode', undef, undef) called at cpanel line 1572
    	main::real_exectag('<cpanel Fileman="restoreaf()">') called at cpanel line 4158
    	main::dotag_finished_headers(0) called at cpanel line 3978
    	main::cpanel_parseblock('<html>^J<head>^J<cpanel setvar="dprefix=../">^J<cpanel include="../...') called at cpanel line 3892
    	main::y('GLOB(0x47a0e50)') called at cpanel line 5257
    	main::run_standard_mode() called at cpanel line 785
    
    After careful testing I determined it is caused by the filename on the .GZ level.
    1. "aliases-domain.com.gz" works, "aliases-domain.com (1).gz" does not work
    2. unpacking and uploading the GZipped file "domain.com" works
    3. unpacking, uploading and then renaming the GZipped file to "domain (1).com" works as well

    hypothesis: GZipped filenames with a " " or "(" or ")" are not handled as expected anymore. Perhaps by design?

    Can you please help in determining and solving the problem? Thank you in advance. :)
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    After step 1, move the downloaded file to another location.

    Any file you download a second time to the same location will have the (1) added to it on your end. This isn't a cPanel issue.
     
  3. agbkorf

    agbkorf Registered

    Joined:
    Apr 17, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I respectfully disagree. In providing not only a download mechanism but also an upload mechanisme I think you're responsible for normal functionality. If it were something obscure, I understand. Monkey-proof interfaces don't exist. But de versioning by a Windows PC is 100% normal behaviour and should, imho, be accounted for. I already saw methods on the internet describing how to deal with this. Not too complex at all.

    Furthermore, the error-message at least could be more clear. It is an obvious case and could easily be notified by an intake mechanism checking if the filename adheres to import-rules.

    If not all of the above, at least specify somewhere in the cPanel documentation what the requirements are for a file to be uploaded. Again, imho, that is the least thing to. (I am going out on a limb here, for I didn't search for it. #LivingDangerous )

    All in all, thank you for the reply thus far. :)
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Please feel free to submit a bug report for this behavior at:

    Submit A Bug Report

    You can post the ticket number here and we can update this thread with the outcome.

    Thank you.
     
  5. agbkorf

    agbkorf Registered

    Joined:
    Apr 17, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Done. Thanks for a great service and a great product combo in WHM/cPanel. (Y)
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    672
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Our technical support team determined the behavior you reported was by design. Please consider opening a feature request for the ability to restore forwarders from different archive names:

    Submit A Feature Request

    Thank you.
     
  7. agbkorf

    agbkorf Registered

    Joined:
    Apr 17, 2014
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Out of curiosity, can you link me to the documentation referring to the import filename requirements?
     
  8. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,470
    Likes Received:
    199
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:

    I don't know of any documentation concerning this specific operation and file name requirements.

    The issue you bring up can be duplicated in any file you download from your account, your website, anywhere on the Internet even. If you download a file a second time into the same directory and do not overwrite the original, the second will be renamed so it can be saved into the same directory.

    The new(1).name shouldn't be an issue when downloading files for viewing, but when uploading it back into a system that's not expecting any sort of file name change, you might expect issues as you've found.

    For example if you did a Full Website Backup to move the account to another server, the file name would be something like this:
    backup-{BACKUP-DATE_TIME}_{USER}.tar.gz

    Download that backup from your account, twice, to the same directory, and the second might look like this:
    backup-{BACKUP-DATE_TIME}_{USER}(1).tar.gz

    According to the, Restore a Full Backup/cpmove File, details in WHM here, there are format requirements:
    WHM » Backup » Restore a Full Backup/cpmove File
    I'm not sure if you're able to restore a backup file in this format or not:
    backup-{BACKUP-DATE_TIME}_{USER}(1).tar.gz

    But I would think, no. Similar to restoring an emailforwarders file as you have.


    That said, I agree with you. To make the system easier for use by someone who may or may not realize that they downloaded the file twice, and then attempt to upload it for a restore of some sort as you have, the system could do a better job of seeing the (1) in the file name, and accounting for it. And the feedback error could be more understandable in this case as well.

    If we want a better cPanel system, we open a Feature Request with our ideas. From there it's up to the community to decide if there's a need or not. Please feel free to share your idea to make cPanel, better.
    cPanel Feature Requests System Introduction Page


    I'd vote for it. :)
     
Loading...

Share This Page