Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EPERM: operation not permitted #819

Open
sytolk opened this issue Jul 30, 2024 · 0 comments
Open

EPERM: operation not permitted #819

sytolk opened this issue Jul 30, 2024 · 0 comments

Comments

@sytolk
Copy link

sytolk commented Jul 30, 2024

I have starting s3rver with option resetOnClose: true

export async function runS3Server(silent = true) {
  // Set NODE_OPTIONS environment variable to use openssl-legacy-provider
  process.env.NODE_OPTIONS = '--openssl-legacy-provider';

  const directoryTargetPath = pathLib.resolve(
    __dirname,
    'testdata-tmp',
    'file-structure',
  );
  const corsConfig = pathLib.resolve(__dirname, 's3rver', 'cors.xml');
  const instance = new S3rver({
    port: 4569,
    address: 'localhost',
    silent: silent,
    directory: directoryTargetPath,
    resetOnClose: true,
    sslEnabled: false,
    configureBuckets: [
      {
        name: 'supported-filestypes',
        configs: [fs.readFileSync(corsConfig)],
      },
    ],
  });

  await instance.run();
  return instance;
}

and this is error on Windows - github actions

Error: EPERM: operation not permitted, lstat 'D:\a\tagspaces\tagspaces\tests\testdata-tmp\file-structure\supported-filestypes\.ts\sample.avif.jpg._S3rver_object'

    at Object.lstatSync (D:\a\tagspaces\tagspaces\node_modules\graceful-fs\polyfills.js:319:16)
    at rimrafSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:237:18)
    at D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:291:39
    at rmkidsSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:291:26)
    at rmdirSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:281:7)
    at fixWinEPERMSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:167:5)
    at rimrafSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:260:26)
    at D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:291:39
    at rmkidsSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:291:26)
    at rmdirSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:281:7)
    at fixWinEPERMSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:167:5)
    at Object.rimrafSync (D:\a\tagspaces\tagspaces\node_modules\s3rver\node_modules\fs-extra\lib\remove\rimraf.js:260:26)
    at FilesystemStore.reset (D:\a\tagspaces\tagspaces\node_modules\s3rver\lib\stores\filesystem.js:108:10)
    at S3rver.reset (D:\a\tagspaces\tagspaces\node_modules\s3rver\lib\s3rver.js:132:16)
    at Server.<anonymous> (D:\a\tagspaces\tagspaces\node_modules\s3rver\lib\s3rver.js:171:14)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant