Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Find the exact path named in the EACCES error, then check which Linux user runs Node and whether that user can write to that path. If page.screenshot({ path }) is the failing operation, the problem is usually the screenshot destination or its parent directory. If the error occurs while Puppeteer or Chrome starts, investigate browser configuration, cache, profile, or other startup requirements instead.

First identify what operation was denied

EACCES means the process lacks permission for an attempted filesystem operation. It does not, by itself, prove that Puppeteer was unable to write the screenshot. Read the complete error and stack trace and note the path and operation—such as opening a file, writing output, or launching Chrome.

  • If the denied path is the image file or its parent directory and the stack points to page.screenshot(), follow the screenshot-output steps below.
  • If the error names Puppeteer configuration, a Chrome profile, or a cache path, or happens before capture begins, follow the browser startup steps.

For example, an issue report with EACCES: permission denied, open '/.config/puppeteerrc' concerns opening a configuration file. It is not evidence of a screenshot destination failure: Puppeteer issue #12730.

Fix permissions on the screenshot destination

1. Resolve the path Puppeteer is actually using

Puppeteer’s ScreenshotOptions API documents that “If path is a relative path, then it is resolved relative to current working directory.” The live API documentation reports Puppeteer 25.12.0: ScreenshotOptions API. A service, container, or CI job may have a different working directory from your interactive shell, so a relative path that worked locally can point somewhere unwritable at runtime.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Log the current directory, resolved destination, and effective process identity immediately before capture:

const path = require('node:path');

const outputPath = 'screenshots/page.png';
console.log({
  cwd: process.cwd(),
  outputPath: path.resolve(outputPath),
  uid: process.getuid?.(),
  gid: process.getgid?.(),
});

For an absolute path, inspect that path directly. For a relative path, inspect the resolved path shown by the code. On Linux, id shows the identity of your current shell, but a service or container may run Node as another user; check the identity in that actual runtime.

2. Make sure the parent directory exists and is writable

Puppeteer does not create missing parent directories for a screenshot path. Create the directory as part of your application setup, then ensure the account running Node has write permission there. For example:

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
mkdir -p ./screenshots
node app.js

Check ownership and permission bits with ls -ld on the parent directory and ls -l on an existing target file. If necessary, adjust ownership or permissions for the specific directory used by the application. Avoid broadly granting write access to system directories or using chmod 777 as a blanket fix; make the smallest change that gives the runtime user the needed access.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

3. Use a known writable destination

For a quick diagnostic, save to a directory that the Node process is expected to own, such as a dedicated application output directory or a writable temporary directory. If that works, the original destination path, directory ownership, or mount permissions are the issue—not the page capture itself.

Save the screenshot without Puppeteer writing a file

If your application can consume image bytes directly, omit path. Puppeteer’s ScreenshotOptions documentation says that omitting path means the image is not saved to disk; the screenshot data is returned to the caller instead. This avoids Puppeteer’s direct write to the destination, but it does not fix a separate Chrome startup or profile permission problem.

Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
const image = await page.screenshot({ type: 'png' });
// Pass image to your storage client, response handler, or other code.

If EACCES happens before the screenshot: check Chrome’s writable paths

Chrome writes profile, configuration, and cache files during startup. Puppeteer’s troubleshooting guidance warns that read-only containers or restricted mounts can prevent those writes. Set writable config and cache locations and an explicit user-data directory, or mount writable directories owned by the runtime user. The exact environment variables and path setup depend on your deployment; Puppeteer’s guidance is here: Puppeteer troubleshooting.

In a container, check which filesystem paths are writable by the user running Node, and whether mounted directories preserve suitable ownership and permissions. Do not assume a screenshot-output path fix will address a denied Chrome profile or cache path; use the path in the error to choose the correction.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Separate other browser launch failures from permissions

Missing Linux libraries

If Chrome will not launch and there is no relevant denied-path error, missing shared libraries may be the cause. Puppeteer’s Linux troubleshooting recommends checking Chrome’s dependencies with ldd chrome | grep not. Resolve the missing libraries for the environment you deploy rather than changing screenshot output permissions: Puppeteer troubleshooting.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft

Sandbox errors

Sandbox failures are a separate launch problem, not a generic solution target for EACCES. Puppeteer’s troubleshooting guidance strongly discourages running Chrome without a sandbox as a casual workaround. Diagnose the specific sandbox error and deployment configuration instead of adding --no-sandbox merely because a screenshot failed.

Troubleshoot by symptom

Symptom Likely branch What to check
EACCES names the screenshot file and capture stack Output write denied Resolve relative paths from process.cwd(); verify the parent exists and the Node runtime user can write there.
EACCES names a config, cache, or profile path Browser runtime file access Provide writable config/cache/user-data locations or writable mounts owned by the runtime user.
Chrome fails before capture, with no denied file path Launch dependency or sandbox issue Check shared libraries with ldd chrome | grep not and diagnose sandbox configuration separately.
The screenshot succeeds without path Direct destination write issue Handle returned screenshot data or correct the original output directory permissions.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo takes a screenshot through one GET request, so you do not need to configure a local Puppeteer browser for this capture. See the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and response headers identify the page verdict and billing status. Its MCP server provides screenshot tools for AI agents, and the free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000. Learn about ScreenshotNeo.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

Frequently Asked Questions

Does EACCES always mean Puppeteer cannot write the screenshot?

No. The denied path and stack trace distinguish a screenshot-output write from configuration, cache, profile, or browser startup access.

Which Puppeteer version does the cited ScreenshotOptions API page report?

The live ScreenshotOptions API documentation reports Puppeteer 25.12.0.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.