pyaff4 icon indicating copy to clipboard operation
pyaff4 copied to clipboard

Missing FS metadata when using --append

Open jgru opened this issue 2 years ago • 0 comments

Dear pyaff4-maintainers,

when I use aff4.py from the master-branch (commit 94a3583475c07ad92147f70ff8a19e9e36f12aa9) and specify --append no filesystem metadata is recorded inside the resulting container. Here are the following steps to reproduce the issue:

echo "a" > a
echo "b" > b

python3 pyaff4/aff4.py --create-logical --paranoid --hash test.aff4 ./a
python3 pyaff4/aff4.py --create-logical --append --paranoid --hash test.aff4 ./b

When running --meta aftwards only FS metadata for a is displayed:

@prefix aff4: <http://aff4.org/Schema#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xml: <http://www.w3.org/XML/1998/namespace> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

<aff4://961a3f9e-0dbf-4084-80c9-bf2e5ef74f5a> a aff4:ImageStream ;
    aff4:chunkSize 32768 ;
    aff4:chunksInSegment 1024 ;
    aff4:compressionMethod <http://code.google.com/p/snappy/> ;
    aff4:size 2 .

<aff4://b1062223-5dc0-4759-939f-08d08469493e//a> a aff4:FileImage,
        aff4:Image,
        aff4:Map ;
    aff4:birthTime "2021-12-26T14:59:50.257219+01:00"^^xsd:string ;
    aff4:hash "60b725f10c9c85c70d97880dfe8191b3"^^aff4:MD5,
        "3f786850e387550fdab836ed7e6dc881de23001b"^^aff4:SHA1 ;
    aff4:lastAccessed "2021-12-26T15:06:37.995319+01:00"^^xsd:string ;
    aff4:lastWritten "2021-12-26T15:06:46.735360+01:00"^^xsd:string ;
    aff4:originalFileName "./a"^^xsd:string ;
    aff4:recordChanged "2021-12-26T15:06:46.735360+01:00"^^xsd:string ;
    aff4:size 2 .

<aff4://b1062223-5dc0-4759-939f-08d08469493e//b> a aff4:FileImage,
        aff4:Image,
        aff4:Map ;
    aff4:originalFileName "./b"^^xsd:string .

<aff4://d9f08e06-ccc7-4ca9-99af-e1f91be71857> a aff4:ImageStream ;
    aff4:chunkSize 32768 ;
    aff4:chunksInSegment 1024 ;
    aff4:compressionMethod <http://code.google.com/p/snappy/> ;
    aff4:size 2 .

<aff4:sha512:FisLMvAkgtWsoKfJPdA86sOs1-QQpfGPP7mQ_JWK4N9vMiM7kYMer5nKWBqMTd-ci6MVrEgtttTqAcx4hKY1vg==> aff4:dataStream <aff4://961a3f9e-0dbf-4084-80c9-bf2e5ef74f5a[0x0:0x2]> .

<aff4:sha512:hopqxuHQKT10-tB_bZWVKz4B09MVPbZ3p12Ad5g_1OMNtr_Im3YIqT-yZGkjOp8aCVctaHqcXaeLID6xUQQKFQ==> aff4:dataStream <aff4://d9f08e06-ccc7-4ca9-99af-e1f91be71857[0x0:0x2]> .


        ./a <aff4://b1062223-5dc0-4759-939f-08d08469493e//a>
                [0,2] -> aff4:sha512:FisLMvAkgtWsoKfJPdA86sOs1-QQpfGPP7mQ_JWK4N9vMiM7kYMer5nKWBqMTd-ci6MVrEgtttTqAcx4hKY1vg==[0,2]
        ./b <aff4://b1062223-5dc0-4759-939f-08d08469493e//b>
                [0,2] -> aff4:sha512:hopqxuHQKT10-tB_bZWVKz4B09MVPbZ3p12Ad5g_1OMNtr_Im3YIqT-yZGkjOp8aCVctaHqcXaeLID6xUQQKFQ==[0,2]

Can you confirm that this is a bug? If it is intended behaviour, how can I save FS metadata while using --append?

Thanks already in advance for a short reply and thank you for your work on pyaff4.

Best regards, jgru

jgru avatar Dec 26 '21 14:12 jgru