After wondering why my startup wasn't going as planned, I found that the rc.local file isn't executable. Is this so by default? I've searched, and haven't heard that the default is not. I have no knowledge of changing it, and wonder how it could have got this way unless it is default.
drwxr-xr-x 2 root root 4096 Jun 6 16:27 rc0.d
drwxr-xr-x 2 root root 4096 Jun 6 16:27 rc1.d
drwxr-xr-x 2 root root 4096 Jun 6 16:27 rc2.d
drwxr-xr-x 2 root root 4096 Jun 6 16:27 rc3.d
drwxr-xr-x 2 root root 4096 Jun 6 16:27 rc4.d
drwxr-xr-x 2 root root 4096 Jun 6 16:27 rc5.d
drwxr-xr-x 2 root root 4096 Jun 6 16:27 rc6.d
-rw-r--r-- 1 root root 455 Jun 9 17:45 rc.local
goldilocks
60.4k17 gold badges117 silver badges236 bronze badges
asked Jun 9, 2017 at 17:52
-
2"Is this so by default?" -> No. In the stock Raspbian image it is world executable.goldilocks– goldilocks2017年06月09日 18:49:54 +00:00Commented Jun 9, 2017 at 18:49
-
@goldilocks I didn't think it was, but don't know how it became so.user1032531– user10325312017年06月09日 19:42:16 +00:00Commented Jun 9, 2017 at 19:42
-
1Well, it could have happened by accident. I'd guess you have done something with this file as it is 35 bytes larger than the original. The current permissions, 644, are the default for new files, so you may have copy pasted then saved it or some such.goldilocks– goldilocks2017年06月09日 19:44:50 +00:00Commented Jun 9, 2017 at 19:44
-
@goldilocks I am sure you are right.user1032531– user10325312017年06月09日 19:50:11 +00:00Commented Jun 9, 2017 at 19:50
1 Answer 1
rc.local should be owned by root and it must be executable
-rwxr-xr-x 1 root root 420 Apr 10 11:27 /etc/rc.local
chmod +x rc.local