aquatone icon indicating copy to clipboard operation
aquatone copied to clipboard

screenshot failed: fork/exec Permission Denied

Open hishammir opened this issue 5 years ago • 9 comments

Hi, I have added the aquatone unix exec file to the $PATH , i have go lang installed , up and running from the terminal directly. The screenshot is running perfectly with chrome but when i specify a chromium path i get the error screenshot failed: fork/exec permission denied.

Here is the commands i used :

$ cat targets.txt | aquatone -chrome-path /Users/butt/downloads/chrome-mac/chromium.app image $ cat targets.txt | aquatone -chrome-path /Users/butt/downloads/chrome-mac/

image

hishammir avatar May 15 '19 23:05 hishammir

It looks like permission issue on the Chromium binary. Does your user have permission to execute the binary? (if not, do a chmod +x Chromium.app and try again)

michenriksen avatar May 16 '19 09:05 michenriksen

I played with the permissions as well, tried chmod +x Chromium.app as well , same error.

hishammir avatar May 16 '19 19:05 hishammir

I have the same issue, and the permissions of the files in that directory are 777. Environment: Debian9

Lllly101 avatar May 17 '19 09:05 Lllly101

Deb 9.

Same error.

d0xo avatar Sep 14 '19 19:09 d0xo

same error also tried to change the permissions for Chromium.app but didn't change anything

faisal-ait avatar Sep 20 '19 23:09 faisal-ait

I keep getting the same error: "screenshot failed: fork/exec /snap/bin/"

/snap/bin is the location of chromium

jdonsec avatar Oct 10 '19 03:10 jdonsec

I had the same issue, but fixed by pointing aquatone to executable within Chromium.app folder, i.e. one of the below:

/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
/Applications/Google\ Chrome\ Canary.app/Contents/MacOS/Google\ Chrome\ Canary
/Applications/Chromium.app/Contents/MacOS/Chromium

daehee avatar May 12 '20 20:05 daehee

In order to eventually get working for me o Ubuntu 20.0.4 I had to install Chromium via snap. Then because the snap location /snap/ is not in the 'paths' array in the source code https://github.com/michenriksen/aquatone/blob/master/agents/url_screenshotter.go#L78 I created a symlink 'ln -s /snap/bin/chromium /usr/bin/chromium'

Also I spotted a possible bug in Chromium which prevents you creating a screenshot if your specified file location includes directory traversal up a level e.g: This fails --screenshot=../screenshots/

/usr/bin/chromium --no-default-browser-check --no-first-run --password-store=basic --headless --disable-gpu --hide-scrollbars --mute-audio --disable-notifications --no-first-run --disable-crash-reporter --ignore-certificate-errors --incognito --disable-infobars --disable-sync --no-default-browser-check --user-data-dir=/tmp/aquatone-chrome605969060 --user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36' --window-size=1440,900 --screenshot=../screenshots/http__campaign_website_com__da39a3ee5e6b4b0d.png http://website.com
[0915/231036.077992:ERROR:headless_shell.cc(591)] Writing to file ..//screenshots/http__website_com__da39a3ee5e6b4b0d.png was unsuccessful, could not open file: FILE_ERROR_ACCESS_DENIED

This writes a file

/usr/bin/chromium --no-default-browser-check --no-first-run --password-store=basic --headless --disable-gpu --hide-scrollbars --mute-audio --disable-notifications --no-first-run --disable-crash-reporter --ignore-certificate-errors --incognito --disable-infobars --disable-sync --no-default-browser-check --user-data-dir=/tmp/aquatone-chrome605969060 --user-agent='Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.108 Safari/537.36' --window-size=1440,900 --screenshot=screenshots/http__website_com__da39a3ee5e6b4b0d.png http://website.com
[0915/232233.511453:INFO:headless_shell.cc(616)] Written to file screenshots/http__website_com__da39a3ee5e6b4b0d.png.

So what this means is that in aquatone -out ../screenshots/ also fails and aquatone -out screenshots/writes a screenshot

dextacy10-13 avatar Sep 15 '20 22:09 dextacy10-13

Hi, you guys can use my repo: https://github.com/shelld3v/aquatone. It uses chromedp instead of Backend, so this issue will no longer exist

shelld3v avatar May 02 '21 15:05 shelld3v