Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

108
Views
fs.access is giving incorrect information

I am trying to check whether write permission exists inside a particular directory in my PC using Node.js. But I think Node.js is checking with respect to the admin user but when I try to download a file/directory inside that directory in the electron app, it's returning Uncaught Exception. Error: EPERM: Operation not permitted, open <file-path>.

    fs.access(download_path, fs.constants.W_OK, (err) => {
        console.log('Checking permission for downloading file...', download_path);
        if(err) {
            // Show an alert if no write access
            const options = {
                type: 'error',
                message: `You do not have permission to download file(s) at ${download_path}`,
                buttons: ['Ok']
            };

            dialog.showMessageBox(null, options, (response) => {
                console.log(response);
            });

            console.log(`File(s) cannot be downloaded at ${download_path}`);
        } else {
            console.log('Downloading file(s)');
            startDownload();
        }
    });
});
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!