I create symlink in init.d
directory:
ln -s /myservice.jar /etc/init.d/myservice
.
After reboot system symlink is replaced with regular file.
ls -l /etc/init.d/myservice
output before reboot:
lrwxrwxrwx 1 root root 30 Mar 31 12:34 /etc/init.d/myservice -> /myservice.jar
After reboot:
-rwxrwxrwx 1 root root 41912304 Mar 31 12:40 /etc/init.d/myservice.jar
Why is this happening?
upd. On the server is used ISPmanager, can this be a problem?
chattr +i filename
will make a file unwritable even by root untilchattr -i
is used to remove the bit. – Wyatt8740 Mar 31 '17 at 13:40