dangerzone webdav processor issueshttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues2021-06-10T18:19:03Zhttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/4hide all dangerzone folders inside a single dangerzone/2021-06-10T18:19:03Zanarcathide all dangerzone folders inside a single dangerzone/right now we have dangerzene-processed, dangerzone-rejected, dangerzone-processing... that's noisy. we should just have a "dangerzone" and "safe" folders, with the processed, rejected, processing stuff inside dangerzone/.right now we have dangerzene-processed, dangerzone-rejected, dangerzone-processing... that's noisy. we should just have a "dangerzone" and "safe" folders, with the processed, rejected, processing stuff inside dangerzone/.anarcatanarcathttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/1systemd service and timer units2021-06-10T19:14:12Zanarcatsystemd service and timer unitswe currently run the script in a loop, in a screen, on dangerzone-01. that's silly, but i was in a rush.
instead, setup a systemd .service file for starting the script and hook it up to a timer unit. setup the credentials in an env file...we currently run the script in a loop, in a screen, on dangerzone-01. that's silly, but i was in a rush.
instead, setup a systemd .service file for starting the script and hook it up to a timer unit. setup the credentials in an env file so that it can live outside the git repository.anarcatanarcathttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/7do not remove everything in 'safe' each time I add a new file2021-06-10T19:15:58ZGabagaba@torproject.orgdo not remove everything in 'safe' each time I add a new fileWhen uploading CVs, we are not going to upload them all at once to nextcloud. It would be great if the files that were already processed, do not get removed when I add a new file to process (unless they have the same name).
I uploaded C...When uploading CVs, we are not going to upload them all at once to nextcloud. It would be great if the files that were already processed, do not get removed when I add a new file to process (unless they have the same name).
I uploaded CVs 1 to 12 and they were processed and we were able to read them in 'safe' folder. But when I added the 13th file then the first 12 files got removed and I only found the 13th in the safe folder.anarcatanarcathttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/15docker fails with "the input device is not a TTY"2021-06-14T19:56:08Zanarcatdocker fails with "the input device is not a TTY"somehow when deployed under systemd, the script totally fails with `the input device is not a TTY`, full log:
```
Jun 14 19:39:38 dangerzone-01 dangerzone-webdav-processor[11497]: moving 19/ to CVS//dangerzone/processing/19/ before dang...somehow when deployed under systemd, the script totally fails with `the input device is not a TTY`, full log:
```
Jun 14 19:39:38 dangerzone-01 dangerzone-webdav-processor[11497]: moving 19/ to CVS//dangerzone/processing/19/ before dangerzone/processing
Jun 14 19:39:40 dangerzone-01 dangerzone-webdav-processor[11497]: downloading CVS//dangerzone/processing/19/ to /tmp/tmpkpyhdm1c/danger/19/
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: processing 3 files in dir /tmp/tmpkpyhdm1c/danger/19 to safe_dir: /tmp/tmp7wzf5x_e/safe//19
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: sanitizing file /tmp/tmpkpyhdm1c/danger/19/matt_lavallee_samples.txt into /tmp/tmp7wzf5x_e/safe//19
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: the input device is not a TTY
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: failed to run docker command: ['docker', 'run', '-it', '--cidfile=/tmp/tmpavcaj0tj/cidfile', '--volume', '/tmp/tmpkpyhdm1c/danger/19/matt_lavallee_samples.txt:/tmp/input_file', '--network', 'none', '--security-opt=no-new-privileges:true', 'flmcode/dangerzone', 'document-to-pixels-unpriv']
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: Traceback (most recent call last):
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: File "/usr/bin/dangerzone-webdav-processor", line 469, in <module>
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: main()
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: File "/usr/bin/dangerzone-webdav-processor", line 336, in main
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: client.process_path(folder, path)
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: File "/usr/bin/dangerzone-webdav-processor", line 395, in process_path
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: self.sanitizer.sanitize_dir(local_path)
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: File "/usr/bin/dangerzone-webdav-processor", line 136, in sanitize_dir
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: self.sanitize_file(os.path.join(root, file), safe_dir=safe_dir)
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: File "/usr/bin/dangerzone-webdav-processor", line 145, in sanitize_file
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: args=["document-to-pixels-unpriv"],
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: File "/usr/bin/dangerzone-webdav-processor", line 258, in run
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: with open(f"{tmpdir}/cidfile") as fp:
Jun 14 19:39:46 dangerzone-01 dangerzone-webdav-processor[11497]: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpavcaj0tj/cidfile'
Jun 14 19:39:46 dangerzone-01 systemd[1]: dangerzone-webdav-processor.service: Main process exited, code=exited, status=1/FAILURE
Jun 14 19:39:46 dangerzone-01 systemd[1]: dangerzone-webdav-processor.service: Failed with result 'exit-code'.
Jun 14 19:39:46 dangerzone-01 systemd[1]: Failed to start Dangerzone WebDAV processor.
```anarcatanarcathttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/9delete kez-bot user in nextcloud after test period2021-09-10T13:43:54Zanarcatdelete kez-bot user in nextcloud after test periodonce @kez is done with the `kez-bot` user, delete it from nextcloud.once @kez is done with the `kez-bot` user, delete it from nextcloud.anarcatanarcat2021-09-10https://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/17Stopped sanitizing files.2021-12-06T21:13:09ZGabagaba@torproject.orgStopped sanitizing files.There is something going on in the folder to be sanitized in the folder '2021 Education and Communities Coordinator' as it stopped sanitizing documents. They are all PDFs from the folder '14..' to '18...'. The folder 14 had a .asc file t...There is something going on in the folder to be sanitized in the folder '2021 Education and Communities Coordinator' as it stopped sanitizing documents. They are all PDFs from the folder '14..' to '18...'. The folder 14 had a .asc file that I just removed.
Can one of you take a look to see what is going on?anarcatanarcathttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/19cleanup leftover files2022-04-04T17:53:37Zanarcatcleanup leftover filesit seems we leave files in /var/lib/docker/volumes. we should clean that up, along with old containers and images.it seems we leave files in /var/lib/docker/volumes. we should clean that up, along with old containers and images.anarcatanarcathttps://gitlab.torproject.org/tpo/tpa/dangerzone-webdav-processor/-/issues/22dangerzone doesn't fix file extensions anymore2023-09-25T05:30:29Zanarcatdangerzone doesn't fix file extensions anymoreSomething happened in Dangerzone that made it fail to rename files after sanitizing. I have just uploaded a file named `Tor_1031.22a.doc` and it did sanitize it correctly into a PDF, but the resulting file in `safe/` is (incorrectly) nam...Something happened in Dangerzone that made it fail to rename files after sanitizing. I have just uploaded a file named `Tor_1031.22a.doc` and it did sanitize it correctly into a PDF, but the resulting file in `safe/` is (incorrectly) named `Tor_1031.22a.doc` instead of `Tor_1031.22a.pdf`.
/cc @lavamind could this be related to 1972f1e4d3f6504c23b7b6db2d6eb84059d247f7?