Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

original file disappear when upload with overwrite is stoped by files_antivirus #100

Open
individual-it opened this issue Jul 23, 2018 · 5 comments
Labels

Comments

@individual-it
Copy link
Member

how to reproduce

  1. set up files_primary_s3
  2. set up files_antivirus
  3. upload a simple test file e.g. curl --user $user:$pwd http://$host/$path/remote.php/webdav/textfile.txt --request PUT -d "test test test"
  4. overwrite the file with a virus file e.g. curl --user $user:$pwd http://$host/$path/remote.php/webdav/textfile.txt --request PUT -d 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*'
  5. check if the original file still exists

Expectation:

the original file should still exist with the old content, that happens when using local file storage backend

What happens:

original file is gone

log:

s3server:

{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44798,"httpMethod":"GET","httpURL":"/","time":1532324525092,"req_id":"bb8bcf7cef49bdec6044","level":"info","message":"received request","hostname":"250338307f9f","pid":148}
{"name":"S3","bytesReceived":0,"bodyLength":0,"bytesSent":364,"clientIP":"::ffff:172.17.0.1","clientPort":44798,"httpMethod":"GET","httpURL":"/","httpCode":200,"time":1532324525094,"req_id":"bb8bcf7cef49bdec6044","elapsed_ms":2.264447,"level":"info","message":"responded with XML","hostname":"250338307f9f","pid":148}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44802,"httpMethod":"HEAD","httpURL":"/owncloud","time":1532324525097,"req_id":"615ae2f2714bb5a02d3d","level":"info","message":"received request","hostname":"250338307f9f","pid":154}
{"name":"S3","bucketName":"owncloud","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44802,"httpMethod":"HEAD","httpURL":"/owncloud","httpCode":200,"time":1532324525098,"req_id":"615ae2f2714bb5a02d3d","elapsed_ms":1.398096,"level":"info","message":"responded to request","hostname":"250338307f9f","pid":154}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44806,"httpMethod":"PUT","httpURL":"/owncloud/urn%3Aoid%3A2147485081","time":1532324525100,"req_id":"d054575f964485e7598e","level":"info","message":"received request","hostname":"250338307f9f","pid":124}
{"name":"S3","bucketName":"owncloud","objectKey":"urn:oid:2147485081","bytesReceived":68,"bodyLength":68,"clientIP":"::ffff:172.17.0.1","clientPort":44806,"httpMethod":"PUT","httpURL":"/owncloud/urn%3Aoid%3A2147485081","contentLength":68,"httpCode":200,"time":1532324525118,"req_id":"d054575f964485e7598e","elapsed_ms":17.938041,"level":"info","message":"responded to request","hostname":"250338307f9f","pid":124}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44812,"httpMethod":"DELETE","httpURL":"/owncloud/urn%3Aoid%3A2147485081","time":1532324525129,"req_id":"10a8faaef14391350aa7","level":"info","message":"received request","hostname":"250338307f9f","pid":166}
{"name":"S3","bucketName":"owncloud","objectKey":"urn:oid:2147485081","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44812,"httpMethod":"DELETE","httpURL":"/owncloud/urn%3Aoid%3A2147485081","bytesDeleted":68,"httpCode":204,"time":1532324525143,"req_id":"10a8faaef14391350aa7","elapsed_ms":13.905805,"level":"info","message":"responded to request","hostname":"250338307f9f","pid":166}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44858,"httpMethod":"GET","httpURL":"/","time":1532324544636,"req_id":"a225ba969a458931768d","level":"info","message":"received request","hostname":"250338307f9f","pid":110}
{"name":"S3","bytesReceived":0,"bodyLength":0,"bytesSent":364,"clientIP":"::ffff:172.17.0.1","clientPort":44858,"httpMethod":"GET","httpURL":"/","httpCode":200,"time":1532324544645,"req_id":"a225ba969a458931768d","elapsed_ms":8.922467,"level":"info","message":"responded with XML","hostname":"250338307f9f","pid":110}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44862,"httpMethod":"HEAD","httpURL":"/owncloud","time":1532324544648,"req_id":"e654e991da47a7f183d9","level":"info","message":"received request","hostname":"250338307f9f","pid":160}
{"name":"S3","bucketName":"owncloud","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44862,"httpMethod":"HEAD","httpURL":"/owncloud","httpCode":200,"time":1532324544650,"req_id":"e654e991da47a7f183d9","elapsed_ms":1.698387,"level":"info","message":"responded to request","hostname":"250338307f9f","pid":160}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44866,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485026","time":1532324544655,"req_id":"aafcee874f4b89433003","level":"info","message":"received request","hostname":"250338307f9f","pid":142}
{"name":"S3","bucketName":"owncloud","objectKey":"urn:oid:2147485026","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44866,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485026","contentLength":1076,"httpCode":200,"time":1532324544666,"req_id":"aafcee874f4b89433003","elapsed_ms":10.783287,"level":"info","message":"responded with streamed content","hostname":"250338307f9f","pid":142}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44872,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485026","time":1532324544672,"req_id":"ec8f2bae764cb8280fe1","level":"info","message":"received request","hostname":"250338307f9f","pid":125}
{"name":"S3","bucketName":"owncloud","objectKey":"urn:oid:2147485026","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44872,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485026","contentLength":1076,"httpCode":200,"time":1532324544683,"req_id":"ec8f2bae764cb8280fe1","elapsed_ms":11.394396,"level":"info","message":"responded with streamed content","hostname":"250338307f9f","pid":125}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44878,"httpMethod":"GET","httpURL":"/","time":1532324544687,"req_id":"cc572d872b44abfd88e4","level":"info","message":"received request","hostname":"250338307f9f","pid":104}
{"name":"S3","bytesReceived":0,"bodyLength":0,"bytesSent":364,"clientIP":"::ffff:172.17.0.1","clientPort":44878,"httpMethod":"GET","httpURL":"/","httpCode":200,"time":1532324544694,"req_id":"cc572d872b44abfd88e4","elapsed_ms":7.226184,"level":"info","message":"responded with XML","hostname":"250338307f9f","pid":104}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44882,"httpMethod":"HEAD","httpURL":"/owncloud","time":1532324544697,"req_id":"8e8bde95304d8029d6ab","level":"info","message":"received request","hostname":"250338307f9f","pid":136}
{"name":"S3","bucketName":"owncloud","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44882,"httpMethod":"HEAD","httpURL":"/owncloud","httpCode":200,"time":1532324544698,"req_id":"8e8bde95304d8029d6ab","elapsed_ms":1.731957,"level":"info","message":"responded to request","hostname":"250338307f9f","pid":136}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44886,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485022","time":1532324544701,"req_id":"74794bd5fd438d0854a9","level":"info","message":"received request","hostname":"250338307f9f","pid":148}
{"name":"S3","bucketName":"owncloud","objectKey":"urn:oid:2147485022","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44886,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485022","contentLength":1225,"httpCode":200,"time":1532324544710,"req_id":"74794bd5fd438d0854a9","elapsed_ms":8.279481,"level":"info","message":"responded with streamed content","hostname":"250338307f9f","pid":148}
{"name":"S3","clientIP":"::ffff:172.17.0.1","clientPort":44892,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485022","time":1532324544714,"req_id":"5c8cef13da4fa9a29b4c","level":"info","message":"received request","hostname":"250338307f9f","pid":154}
{"name":"S3","bucketName":"owncloud","objectKey":"urn:oid:2147485022","bytesReceived":0,"bodyLength":0,"clientIP":"::ffff:172.17.0.1","clientPort":44892,"httpMethod":"GET","httpURL":"/owncloud/urn%3Aoid%3A2147485022","contentLength":1225,"httpCode":200,"time":1532324544723,"req_id":"5c8cef13da4fa9a29b4c","elapsed_ms":8.829797,"level":"info","message":"responded with streamed content","hostname":"250338307f9f","pid":154}

owncloud.log

{"reqId":"dR03AwG7TfJigE16S0ow","level":2,"time":"2018-07-23T05:45:02+00:00","remoteAddr":"127.0.0.1","user":"admin","app":"files_antivirus","method":"PUT","url":"\/owncloud-core\/remote.php\/webdav\/textfile.txt","message":"Infected file deleted. Eicar-Test-Signature Account: admin Path: files\/textfile.txt"}
@ownclouders
Copy link
Contributor

GitMate.io thinks a possibly related issue is #69 (Cannot upload a file of 10GB).

@DeepDiver1975
Copy link
Member

Interesting .... it the behavior the same with regular storage? THX

@individual-it
Copy link
Member Author

no the local storage keeps the old file

@DeepDiver1975
Copy link
Member

THX

@DeepDiver1975 DeepDiver1975 self-assigned this Jul 23, 2018
@individual-it
Copy link
Member Author

individual-it commented Jul 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants