pydio / pydio-booster

Empower your Pydio server with this golang-based dedicated tool.
GNU Affero General Public License v3.0
8 stars 5 forks source link

Upload doesn't work with antivirus scanning plugin #5

Open carlchan opened 7 years ago

carlchan commented 7 years ago

When uploading using booster and antivirus scan plugin enabled, upload fails to complete or reports virus present.

Anonymized log: Dec 23 12:36:08 pydio-01 pydio[12261]: INFO 2016/12/23 12:36:08.172425 [pydiomiddleware] Request Job Start {http 127.0.0.1 /api/{repo}/upload/put/{nodedir} false xhr_uploader=true } [[X-File-Direct-Upload upload-finished] [X-Pydio-Admin-Auth TOKENS:TOKENP] [X-File-Name {nodename}]] map[xhr_uploader:[true]] body Dec 23 12:36:08 pydio-01 pydio[12261]: ERROR 2016/12/23 12:36:08.172531 [pydiomiddleware] Could not decode to auth Dec 23 12:36:08 pydio-01 ool pydio[27622]: 127.0.0.1#011USERNAME#011Pydio\Core\Services\AuthService#011Log In#011context=API Dec 23 12:36:08 pydio-01 ool pydio[27622]: 127.0.0.1#011USERNAME#011access.fs#011Upload File#011file=hometest//dnsservers.list;files=hometest//dnsservers.list Dec 23 12:36:08 pydio-01 ool pydio[27622]: 127.0.0.1#011USERNAME#011AntivirusScanner.php#011error l.151#011message=mkdir(): Permission denied

Antivirus scan works if booster daemon is disabled, and upload with booster works if antivirus is disabled.

carlchan commented 7 years ago

I think I figured it out.

Looks like when uploading with pydio booster, the antivirus plugin uses the "scanLater" function and tries to mkdir in the "trace" directory as the "scan_diff_folder", even if trace is disabled in the plugin.

Changing the trace directory to one the pydio can write to fixes it. Not sure if this is expected behaviour.