I can manually run myscript.sh, by cron job and also as any user except admin(root) ?!
myscript.sh:
#!/bin/bash
i="0"
while [ $i -lt 1 ]
do
done
an infinite while loop!
I can see it in htop.
cron tab log :
Jan 25 13:14:01 mail crond[13505]: (admin) CMD (/home/admin/mybash.sh)
but there is no action! In fact crontab log only shows that it is not executed.
— EDIT mybash
[root@mail admin]# cat mybash
#!/bin/bash
echo hi
[root@mail admin]# ls -l mybash
-rwxr-xr-x 1 admin admin 20 Jan 25 14:47 mybash
[root@mail admin]# crontab -l -uadmin
#DO NOT EDIT THIS FILE. Change through DirectAdmin
MAILTO=MYEMAIL@gmail.com
*/1 * * * * /home/admin/mybash
[root@mail admin]# ./mybash
hi
Jan 25 14:50:01 mail crond[23679]: (admin) CMD (/home/admin/mybash)
noting!
but by another user (artlight) I received an e-mail:
Jan 25 14:56:01 mail crond[24688]: (artlight) CMD (/home/admin/mybash)