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

Error: EACCES: permission denied, mkdir '/sessions' #98

Open
jackpilowsky opened this issue Nov 10, 2021 · 0 comments
Open

Error: EACCES: permission denied, mkdir '/sessions' #98

jackpilowsky opened this issue Nov 10, 2021 · 0 comments

Comments

@jackpilowsky
Copy link

jackpilowsky commented Nov 10, 2021

I'm a little stuck on this error. I'm sending in the following config

 app.use(session({
    store: new FileStore({
        path: './sessions/store'
    }),
    secret: 'some secret',
    resave: true,
    saveUninitialized: true
 }));

So, something funky is going on. Where is it getting '/sessions' from? I have tried setting the options to an empty object literal, and no luck. Here is the full error:

 Wed Nov 10 2021 02:03:41 GMT-0500 (Eastern Standard Time) Error: EACCES: permission denied, mkdir '/sessions'
     at Object.mkdirSync (node:fs:1334:3)
     at mkdirsSync (/efs/home/svc-myapp/myapp/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:31:9)
     at Object.mkdirsSync (/efs/home/svc-myapp/myapp/node_modules/fs-extra/lib/mkdirs/mkdirs-sync.js:36:14)
     at new FileStore (/efs/home/svc-myapp/myapp/node_modules/session-file-store/lib/session-file-store.js:29:8)
     at module.exports (/efs/home/svc-myapp/myapp/server/config/express.js:92:13)
     at /efs/home/svc-myapp/myapp/server/index.js:52:33
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