What are the correct permissions for /etc/init.d/ scripts and what chmod options sets them?
Asked
Active
Viewed 3.2k times
1 Answers
17
The common set is simply 755 even though only root should be running them.
So:
chmod 0755 <file>
![](../../users/profiles/2561.webp)
Kyle Brandt
- 82,107
- 71
- 302
- 444
![](../../users/profiles/3489.webp)
LapTop006
- 6,466
- 19
- 26
-
Why 0644 to set 755 ... ? – Kyle Brandt Aug 03 '09 at 11:33
-
Indeed, should be chmod 0755
– Aug 03 '09 at 12:02 -
Updated, he can change back if he wants :-) – Kyle Brandt Aug 03 '09 at 12:04
-
1Why do regular users need to see where all the configs and other system-only stuff is? I set it all to 0700 – Marcin Aug 03 '09 at 12:35
-
Clearly because I can't type ;-P As for using 0700, you *can*, I don't see the point, almost all of the scripts on a machine will come from a vendor so it's easy to get a copy if you want. – LapTop006 Aug 03 '09 at 13:12
-
6This is giving execute permissions to world (what?) and group (ok, sure). Why would that ever be a good thing, or necessary in this case? – Kzqai Jul 11 '13 at 22:36
-
What about file ownership? Any references to manpages? – deed02392 Mar 07 '18 at 16:12