a bit of a cross ubuntu/node question here but feels like node is the appropriate place to ask.i built a cms of sorts for a site I'm doing at the moment and during testing i used cloudinary to host and serve images. i dont have cloudinary money available so i built a tool to do some basic image manipulation and am now trying to get my head around the best way to serve the content.what i want is to upload an image in my MERN app to a location on my server but outside of the applications own directory tree/public scope, saving the location to the database, to later be fetched by another app.but as this location is out of my applications scope and i need to be able to write to it from only my application but read from others im confused as to where i should handle these permissions.three things that I've thought about..does the fs module come with a built in solution to handle read/write permissions in this way?is it sufficient/possible to use the jwt/auth ive already set up for the other end points my cms hits?added to that one really, can i add my application to a group and set chmod settings for a folder to be writable to only from this application? coupled with jwt auth i guess would be a decent level of security.dealing with permissions and authentication is confusing to me at the best of times so having node and ubuntu permissions cross over in my head is a big problem.apologies if this is a bit vague or doesn't make sense. im trying to make sense of my thoughts while writing so fingers crossed it's not all drivel :)thanksosc
Submitted September 16, 2020 at 10:48PM by Oscady
No comments:
Post a Comment