LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   init command question (https://www.linuxquestions.org/questions/linux-newbie-8/init-command-question-938573/)

vp0619520 04-07-2012 01:34 AM

init command question
 
Hi team,
I have a question,I found that the permission of "/sbin/init "is 755,but why can not I run this command with the general user?

acid_kewpie 04-07-2012 03:21 AM

well you can literally run it, but the code will check your uid and only permit any consequences to be taken by root.

matrix13 04-07-2012 03:29 AM

The permissions for the command is indeed rwxr-xr-x (755). But, though the command can be initiated by user, it will be executed as root. That is a limitation of that command, but an intentional limitation so that the user will not accidentally harm the system.

vp0619520 04-07-2012 04:05 AM

Acid_kewpie/matrix13 Thanks a lot!
So you mean the running mechanism or verification rules has been written in the program.Because I found that the file "/sbin/init" is a compiled executable program.Is that right?


Best regards.


All times are GMT -5. The time now is 05:41 AM.