directus-labs / agency-os

The open source operating system for digital agencies. Built with Directus and Nuxt.
https://agencyos.dev
MIT License
595 stars 114 forks source link

You don't have permission to access this.", extensions: [Object] #118

Open thedarkknight197 opened 2 months ago

thedarkknight197 commented 2 months ago

Following readmi installation guide for local environment, setting user admin auth token in npm i and npm dev it give permission error.

Directus is running on 0.0.0.0:8055

 ERROR  { errors:                                                                                                                                                                                                                                                                                         11:25:08
   [ { message: "You don't have permission to access this.", extensions: [Object] } ],
  response:
   Response {
     [Symbol(realm)]: null,
     [Symbol(state)]:
      { aborted: false,
        rangeRequested: false,
        timingAllowPassed: true,
        requestIncludesCredentials: true,
        type: 'default',
        status: 403,
        timingInfo: [Object],
        cacheState: '',
        statusText: 'Forbidden',
        headersList: [HeadersList],
        urlList: [Array],
        body: [Object] },
     [Symbol(headers)]:
      HeadersList { cookies: null, [Symbol(headers map)]: [Map], [Symbol(headers map sorted)]: null } } }

 WARN  Please ensure the directus instance is reachable at http://0.0.0.0:8055.                                                                                                                                                                                                                           11:25:08

 ERROR  [unhandledRejection] EACCES: permission denied, watch '/home/michele/IdeaProjects/agency-os/.directus/data/database'                                                                                                                                                                              11:37:25

  at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
  at __node_internal_uvException (node:internal/errors:552:10)
  at FSWatcher.<computed> (node:internal/fs/watchers:247:19)
  at Object.watch (node:fs:2418:34)
  at createFsWatchInstance (node_modules/chokidar/lib/nodefs-handler.js:119:15)
  at setFsWatchListener (node_modules/chokidar/lib/nodefs-handler.js:166:15)
  at NodeFsHandler._watchWithNodeFs (node_modules/chokidar/lib/nodefs-handler.js:331:14)
  at NodeFsHandler._handleDir (node_modules/chokidar/lib/nodefs-handler.js:567:19)
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
  at async NodeFsHandler._addToNodeFs (node_modules/chokidar/lib/nodefs-handler.js:617:16)
ictnmd commented 1 month ago

I'm having this issue today and I found that you need to add "read permissions" for globals, pages, redirects, ... for public access policy.