richardlehane / siegfried

signature-based file format identification
http://www.itforarchivists.com/siegfried
Apache License 2.0
224 stars 30 forks source link

Ensure that SF doesn't hang w/o user read perms #116

Closed ross-spencer closed 6 years ago

ross-spencer commented 6 years ago

User will see the following output if they/SF does not have relevant user permissions:

[FILE] /home/ross-spencer/git/go/src/github.com/richardlehane/siegfried/cmd/sf/cantwrite
[ERROR] file does not have user read permissions; and cannot be scanned
---
siegfried   : 1.7.8
scandate    : 2018-05-25T11:41:00+02:00
signature   : default.sig
created     : 2017-12-02T14:49:35+11:00
identifiers : 
  - name    : 'pronom'
    details : 'DROID_SignatureFile_V93.xml; container-signature-20171130.xml'
  - name    : 'tika'
    details : 'tika-mimetypes.xml (1.16, 2017-07-07)'
  - name    : 'freedesktop.org'
    details : 'freedesktop.org.xml (1.9, 2017-09-18)'
  - name    : 'loc'
    details : 'fddXML.zip (2017-09-28, DROID_SignatureFile_V93.xml, container-signature-20171130.xml)'
---
filename : 'cantwrite'
filesize : 0
modified : 2018-05-25T10:53:20+02:00
errors   : 'file does not have user read permissions; and cannot be scanned'
matches  :
richardlehane commented 6 years ago

nice, thanks Ross!