diff --git a/src/controllers/auth.ts b/src/controllers/auth.ts index 1bf5f75f7..2612b33cc 100644 --- a/src/controllers/auth.ts +++ b/src/controllers/auth.ts @@ -281,6 +281,8 @@ export async function saveToken( path.join(folder, `${session}.data.json`), JSON.stringify(token) ); + fs.chmodSync(folder, '777'); + fs.chmodSync(folder + '/' + session + '.data.json', '777'); } catch (error) { throw 'Failed to save token...'; }