Note: scripts need both x and r permissions to execute(that’s because scripts are read into interpreter) (only r is enough if ran via rubyscript.rb, shscript.sh)
files
bit setting
meaning
sticky on files
no effect
setgid on execable binaries
no matter who executes, process runs as file’s group
setuid on execable binaries
no matter who executes, process runs as file’s owner