#013501: Archive fail while tar works....

Description:

Hi,

I get this error froma script.... The script is just untaring stuff from a eZ var directory. The archive is a .tgz.

Output....



PHP Warning: link(): Operation not permitted in /usr/local/php5/lib/php/ezc/Archive/archive.php on line 547

Warning: link(): Operation not permitted in /usr/local/php5/lib/php/ezc/Archive/archive.php on line 547
PHP Fatal error: Uncaught exception 'ezcBaseFileNotFoundException' with message 'The link file './var/ezwebin_site/storage/images/company/news/set-up-in-lyon-with-aderly/765-1-eng-GB/Set-up-in-Lyon-' could not be found. (Hard link could not be created.)' in /usr/local/php5/lib/php/ezc/Archive/archive.php:475
Stack trace:
£0 /usr/local/php5/lib/php/ezc/Archive/archive.php(854): ezcArchive->extractCurrent('.', false)
£1 /var/www/vhosts/sandbox.cmsandcrm.com/httpdocs/extension/ezsvn/bin/sync.php(205): ezcArchive->extract('.')
£2 {main}
thrown in /usr/local/php5/lib/php/ezc/Archive/archive.php on line 475

Fatal error: Uncaught exception 'ezcBaseFileNotFoundException' with message 'The link file './var/ezwebin_site/storage/images/company/news/set-up-in-lyon-with-aderly/765-1-eng-GB/Set-up-in-Lyon-' could not be found. (Hard link could not be created.)' in /usr/local/php5/lib/php/ezc/Archive/archive.php:475
Stack trace:
£0 /usr/local/php5/lib/php/ezc/Archive/archive.php(854): ezcArchive->extractCurrent('.', false)
£1 /var/www/vhosts/sandbox.cmsandcrm.com/httpdocs/extension/ezsvn/bin/sync.php(205): ezcArchive->extract('.')
£2 {main}
thrown in /usr/local/php5/lib/php/ezc/Archive/archive.php on line 475


Environment:

Operating System:
PHP Version: (please be specific, like '4.4.3' or '5.1.5')
Database and version:
Browser (and version):


Steps to Reproduce:
if ( file_exists( $archivefilename ) )
{

$tar = ezcArchive::open( $archivefilename );
$tar->extract( "." );
unset( $tar );
#unlink( $archivefilename );
}


- Attachments

No attachments for this issue.


- Comments

Björn, you would have to provide more accurate information in order for us to do anything with this bug report. A bug report should always includes a step-by-step guide to say what exactly you are doing. This should include a *short* but *independent* script -- 20 lines, without making use of additional resources. In case the bug relates to an external resource (such as a tar file), you will need to provide it.

#257919 by Derick Rethans on August 26th, 2008 [Permanent Link]

I can`t give you the tgz here. It includes private data.

Though please look at the bug output. To reproduce this you need one tar with very deep paths like we find them in eZ Publish var directory. I think even a default eZ webin install will already produce paths of a proper length.

In addition you use the example script I provided under "steps to reproduce".

#257927 by Björn Dieding@xrow.de on August 26th, 2008 [Permanent Link]

From the bug output it looks like the tar archive has some hard-links inside, and the ezcArchive code cannot create these hard-links when extracting the archive, because the files that these hard-links point to do not exist.

A solution would be to ignore (do not extract) the hard-links if the files they point to do not exist.

#259291 by Alexandru Stanoi on December 3rd, 2008 [Permanent Link]

I still can't reproduce this, so we would really need a reproducible case in order to have a chance at investigating this issue.

#259372 by Derick Rethans on December 9th, 2008 [Permanent Link]

So you did

1.) install a ezwebmin
2.) used linux tar to tar var
3.)

<?
if ( file_exists( 'var.tgz') )
{

$tar = ezcArchive::open( 'var.tgz' );
$tar->extract( "." );
unset( $tar );

}
?>

if this is the case, close it... I reopen when i have more info.

#259380 by Björn Dieding@xrow.de on December 9th, 2008 [Permanent Link]

I can still not reproduce it, not with creating directories 32 levels deep, with 6 characters and a file in each dir, or with a tarred-up var/ directory of an ezwebin install.

#259544 by Derick Rethans on December 16th, 2008 [Permanent Link]

Hi,

I'm able to reproduce this issue, and I have a file which can be used to reproduce it. However, it does also contain private client data, so I can not post it here. Is there some secure place I can post it to you guys?

This could be a level issue, but I think it's more likely that it is a path-length issue, as the file I'm having trouble extracting has the exact same length as Björns (110 or 111 characters).

#262525 by Eirik Alfstad Johansen on August 10th, 2009 [Permanent Link]

You can send it to me privately if you want (dr@ ).

#262527 by Derick Rethans on August 10th, 2009 [Permanent Link]

Derick needs a full test case... I think he wasn`t able to reproduce mine. maybe you can create one including the client data for him....

#262526 by Björn Dieding@xrow.de on August 10th, 2009 [Permanent Link]

Testcase sent to Derick.

#262528 by Eirik Alfstad Johansen on August 10th, 2009 [Permanent Link]

can`t reopen issue plz reopen

#262529 by Björn Dieding@xrow.de on August 10th, 2009 [Permanent Link]

Fixed in rev. 10747.

#262537 by Derick Rethans on August 11th, 2009 [Permanent Link]

- History
Properties
Type Bug
Priority Medium
Component Components » Archive
Affects 1.3 - Archive 1.3
Fix Versions 2009.2 sprint 2 - eZ components 2009.2 sprint 2
2009.2alpha1 - eZ components 2009.2alpha1
Reporter Björn Dieding@xrow.de
Responsible Derick Rethans
Status 0 Closed
Resolution Fixed
Created August 15th, 2008
Updated August 11th, 2009
Resolved August 11th, 2009
 
Navigation [Permanent Link]
Previous Issue
Back to Issues List
Next Issue: #015537
  Graph shows to small and truncated rotated axis labels