Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

105
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda