0

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
  • 58,859
  • 17
  • 112
  • 227
user1032531
  • 307
  • 1
  • 5
  • 10
  • 2
    "Is this so by default?" -> No. In the stock Raspbian image it is world executable. – goldilocks Jun 09 '17 at 18:49
  • @goldilocks I didn't think it was, but don't know how it became so. – user1032531 Jun 09 '17 at 19:42
  • Well, 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 Jun 09 '17 at 19:44
  • @goldilocks I am sure you are right. – user1032531 Jun 09 '17 at 19:50

1 Answers1

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
paj
  • 311
  • 1
  • 6