byt3bl33d3r / WitnessMe

Web Inventory tool, takes screenshots of webpages using Pyppeteer (headless Chrome/Chromium) and provides some extra bells & whistles to make life easier.
GNU General Public License v3.0
727 stars 109 forks source link

PermissionError: [Errno 13] Permission denied: in docker container #40

Closed ghost closed 2 years ago

ghost commented 2 years ago

Hi, i run docker with docker run --rm -ti --entrypoint=/bin/sh $IMAGE_ID but, i don't have enough rights to run witnessme screenshot https://google.com, how to fix it?

$ witnessme screenshot https://google.com
[witnessme.screenshot] INFO - Starting scan 0ba5b46f-4349-4535-a3ab-1dd522fa9373
Traceback (most recent call last):
  File "/home/appuser/.local/bin/witnessme", line 8, in <module>
    sys.exit(run())
  File "/home/appuser/.local/lib/python3.8/site-packages/witnessme/console/witnessme.py", line 113, in run
    args.func(args)
  File "/home/appuser/.local/lib/python3.8/site-packages/witnessme/utils.py", line 41, in wrapper
    return asyncio.run(f(*args, **kwargs))
  File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
    return future.result()
  File "/home/appuser/.local/lib/python3.8/site-packages/witnessme/console/witnessme.py", line 19, in screenshot
    await cmd.start()
  File "/home/appuser/.local/lib/python3.8/site-packages/witnessme/commands/screenshot.py", line 128, in start
    await self._scan_task
  File "/home/appuser/.local/lib/python3.8/site-packages/witnessme/commands/screenshot.py", line 114, in setup_and_run
    os.mkdir(self.report_folder)
PermissionError: [Errno 13] Permission denied: 'scan_2022_02_22_180619'
ghost commented 2 years ago

i restarted docker, and woks...