Error: EACCES: permission denied, open 'image.jpg' code: 'EACCES'

The following code runs flawlessly when tested locally, but returns the following error when run during render cron job. This project is using puppeteer and I assumed there would be some limitations to using fs when deployed to render such as all files being deleted after instance spins down ect. However, I did not expect this. I only need the file to be stored for a couple seconds so I can then
use puppeteer to upload the file. What is the best way of doing this? Some sort of temp storage? I only need the file to be stored for a couple seconds so it can be uploaded.

Also, sorry if formatted this post wrong this is my first time posting! Please let me know if you need more code, context ect.


Error: EACCES: permission denied, open ‘image.jpg’


const imageUrl = ‘’;

const viewSource = await page.goto(imageUrl);
const buffer = await viewSource.buffer();
fs.writeFileSync('image.jpg', buffer);

await page.goto("");
await page.waitForSelector('h3', { timeout: 60000 });

await page.waitForSelector('[data-testid="editorAddButton"]');

// Click the button

await delay("2000");

const [fileChooser] = await Promise.all([
    page.waitForFileChooser(),'button[aria-label="Add an image"]')
await fileChooser.accept(['image.jpg']);

Hi there,

Where are you trying to save the file to within the service? Most absolute paths (unless you have a disk) are going to be inaccessible – are you using a relative path from the service root to save the file?

It sounds like you are already aware of the ephemeral temporary storage, so I won’t go into that here. Just be aware that a persistent disk is available on Web/Private Services and Background Workers if/when needed.


Render Support Engineer, MT (UTC-6, UTC-7 in Winter)