batlles rwx
on the files will give the user2 the ability to read, write, and execute those files.
Directory permissions work a bit differently: rwx
on the directories will give user2 the ability to do the following:
- List the contents of the directory (via
r
)
- Create and delete files and directories within the directory (via
w
)
- Navigate into the directory (via
x
)
However, none of these permissions will give user2 the ability to start and stop the app, because filesystem permissions don't give you control over another user's processes.
For the sort of collaboration you're describing we really recommend that you collaborate via git or some other version control system and then deploy via a post-commit hook or similar that copies the files into place and restarts the app automatically.
Will make a HOWTO for this as soon as I have a chance 🙂