[Solved :] Meteor.js having issues downloading file to Digital Ocean (Ubuntu)
So, if you would have read/used any of the mechanisms to download a file from the internet. You will surely, come across the below error. Read further: Meteor.js — Download files form the internet using node packages
Error: EACCES, open ‘/opt/yourappname/uploads/filename.jpg'
There were 2 problems in having this work. First problem was that the /uploads folder wasn’t existing.
So, just go and create the uploads folder using
mkdir uploads
Problem number 2, the access issue. And it has nothing to do with Meteor or NodeJS. You just need to provide access to the user.
chmod o+rw uploads
But, this may not work for the most part. This is cause, It’s more of the meteoruser that’s running the meteor application not having access to read/write to the folder and not the default root user
Default user for any meteor application is meteoruser.
You can give access to the meteoruser by using the below command
chown -R meteoruser uploads
Note: While giving access make sure you are in the parent directory that contains the upload folder.