Hacker News new | ask | show | jobs
by huk 5118 days ago
Is there any security mechanism, which not allow execute external commands (for example `rm -Rf *`)?
3 comments

Heroku provides a read-only file system on their Bamboo stack, and a "scratch-pad" file system on their Cedar stack where changes are thrown away after the web request finishes.
Thanks, I didn't know that.
I guess the user account has restricted access in what commands are available.
exec('sudo cat /etc/shadow') => RestrictedCodeException System Calls disabled

Also, while File.read('/etc/passwd') works, at least File.read('/etc/shadow') doesn't.