ruby - Access permission to execute a script -
i understand 3 types of permissions file (read, write, execute) can set independently, hence there 8 possibilities per file per user (superuser, group, normal user). based on fact, had believed superuser can set script file (in case, ruby file) executable not read/writable normal user. in context of this question, wayne conrad , linuxios noted me script cannot run user not have read permission file.
why case? if user needs read permission in order execute it, why possible set 3 permission types independently? particularly, mean set script file permission executable not readable?
is there way (hackish, may be) make script file runnable not readable user?
in case of script files (python, perl, ruby, shell, etc.), file not "executed" in usual sense. instead, user's shell opens file if fork/exec it, spots shebang , arranges have requested interpreter started, , passes rest of file it. if user doesn't have read permission on file, user's shell can't read it, , setup fails.
this isn't case binary commands, can indeed set no read permission, , still work.
Comments
Post a Comment