Deploy Fails with Permission Denied. chmod 777 Everything?
A deploy fails with permission errors and a teammate wants to chmod -R 777 the app directory so it never happens again. Defend fixing the actual ownership mismatch instead.
the decision you defend
A deploy to a Linux VM fails with 'Permission denied' when the app tries to write to its data directory. A teammate says just run chmod -R 777 on the whole app directory so permissions can never break a deploy again. What do you do, and why?
the situation
A routine release to a single Linux VM fails. The app starts, then crashes with 'Permission denied' writing to /srv/app/data/uploads. ls -l shows the directory owned by root, while the service runs as the appuser account. This is the second time this month a deploy has died on permissions.
context
The app is deployed by a CI job that rsyncs files onto the box over SSH and restarts the systemd service. Last month someone "fixed" a similar error by hand and it came back with this release. A teammate in chat says: just chmod -R 777 /srv/app and we will never see this class of error again.
How this challenge works
Take a position on the decision above and defend it. A senior-engineer AI will push back over up to 4 rounds. When you are done, you are scored against a verified rubric so you can see exactly what a complete answer covers - these are learning prompts, not gotchas.