Esteban89
Esteban89

Reputation: 691

Error when deploying to modulus

I'm trying to deploy my first meteor app to modulus.io but I'm getting the following error in the log:

Error: EACCES, permission denied '/mnt/data/cfs'
at Object.fs.mkdirSync (fs.js:654:18)
at sync (/mnt/data/1/node_modules/mkdirp/index.js:55:12)
at sync (/mnt/data/1/node_modules/mkdirp/index.js:61:24)
at Function.sync (/mnt/data/1/node_modules/mkdirp/index.js:61:24)
at new FS.Store.FileSystem (packages/cfs:filesystem/filesystem.server.js:37:1)
at app/leads.js:69:3
at app/leads.js:332:3
at /mnt/data/1/programs/server/boot.js:222:10
at Array.forEach (native)
at Function._.each._.forEach (/mnt/data/1/node_modules/underscore/underscore.js:79:11)

It's obviously something about permissions but don't know how to fix it. Any ideas?

Upvotes: 0

Views: 178

Answers (1)

Christian Fritz
Christian Fritz

Reputation: 21364

It seems you are trying to create a directory in /mnt/data/cfs, and you don't have permissions from the OS to do that. From quickly looking over the modulus.io documentation (http://help.modulus.io/customer/portal/articles/1653448-file-storage), the platform allows you to write in exactly two directories: your local app directory, and /mnt/data/tmp. You are trying to write to a different directory. So that won't work.

Try using /mnt/data/tmp/cfs instead of /mnt/data/cfs.

It looks like you are using CollectionFS, and that package is using the directory in question. If that is the case, then you'll need to update the path option for that package:

var myStore = new FS.Store.FileSystem("something", {
  path: "/mnt/data/tmp/cfs",
});

BTW, I had to infer a lot from your error (use of CFS, what directory you are trying to create). When asking questions, it is better to provide that sort of detail.

Upvotes: 1

Related Questions