The behavior of /etc/rc.local
changed from firmware version RUT2M_R_00.07.13.4 to RUT2M_R_00.07.14.2. Commands in that file are no longer run as user root
, but as user admin
instead. This is due to /etc/init.d/rclocal
being changed.
Before:
#!/bin/sh /etc/rc.common
START=99
boot() {
# process user commands
[ -f /etc/rc.local ] && {
sh /etc/rc.local
}
}
After:
#!/bin/sh /etc/rc.common
START=99
boot() {
# process user commands
[ -f /etc/rc.local ] && {
chmod 770 /etc/rc.local
chown admin:user /etc/rc.local
su admin -s /bin/sh -c /etc/rc.local
}
}
The admin
user is much less privileged than the root
user so this breaks all the commands I am running from /etc/rc.local
. I cannot be the only person where this is a problem.
Please revert this change in the firmware, you have removed a feature that has existed since the beginning in OpenWrt.