chmod 777 ./myapp
Why do i need to provide chmod 777 to myapp after every publish.
Without providing permissions the result of ./myapp
is: Permission denied. Even when logged in using root
user.
Are there any alternatives to do this?
chmod 777 ./myapp
Why do i need to provide chmod 777 to myapp after every publish.
Without providing permissions the result of ./myapp
is: Permission denied. Even when logged in using root
user.
Are there any alternatives to do this?
Whatever is "publishing" the app needs to write it with the correct permissions. You are not showing us how you are doing that so we can't tell you what exactly is wrong, but something like
chmod 755 myapp # only really required the first time
scp myapp prod:/srv/myapp/
If you are using a version control system like Git, the permissions change is a change you need to commit in order to preserve it.
chmod 755 myapp
git add myapp
git commit -m "fixed permissions" myapp
Now every check-out should have the correct permissions and you can forget about this until next time you start a new project.