Reputation: 2779
As a reference, say a developer builds a vanilla php webapp with a ngnix server. It would make sense to host the web files in the /srv/www directory on a VPS. The owner and group of this /srv/www is nginx.
What is the correct directory to host webapps when running said webapp with nodejs? What is the correct folder permissions for said directory? And of course, please keep in mind security is very important. The OS, in this case is Centos 6.5.
Upvotes: 2
Views: 1901
Reputation: 146014
Generally for permissions I set things up as follows:
myapp
with group set to admin
myapp
with group admin
There are a few conventions here. The most formal being the linux Filesystem Hierarchy Standard which has long-running and more-or-less agreed upon conventions.
/opt/myapp
/var/opt/myapp
/var/opt/log/myapp
/etc/opt/myapp
myapp
and have appropriate FS read/write permissionsFor the docker world, it's similar to PaaS in that it doesn't matter all that much, but, for example for phusion's baseimage-docker things will "just work" for you if you install your code to /home/app
within the container
Upvotes: 7