Unable to run scripts from user

I’m having some problems getting my automation scripts to run. The commands that I use keep getting returned not found, but the commands work perfectly fine if run from the draggy account, just not through the script. It may have something to do with lshell, but I couldn’t figure out any settings that work.

the script’s log:

/home/draggy/scripts/send_item: line 8: date: command not found
— Starting —
/home/draggy/scripts/run_filebot: line 12: filebot: command not found
/home/draggy/scripts/run_rclone: line 5: ps: command not found
/home/draggy/scripts/run_rclone: line 5: grep: command not found
/home/draggy/scripts/run_rclone: line 6: tee: command not found
/home/draggy/scripts/run_rclone: line 6: date: command not found
/home/draggy/scripts/run_rclone: line 6: echo: write error: Broken pipe
/home/draggy/scripts/send_item: line 29: date:` command not found
— Stopping —

I tried adding all of these commands to allowed list, but that didn’t work. The error message suggests that it’s not being restricted but it can’t actually find the command. These basic commands exist in /bin, so I added /bin to the env_path but that didn’t help either. I’m not really sure what else it could be now.

edit: I’ve done some more testing and I found that if I use the path it works “/bin/date”, date does not. I checked the PATH variable while inside of the script and it’s correct though… “/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games”

edit2: I solved it, I was foolishly setting a variable called PATH in my script and it did not occur to me what that means. You can remove this post…

1 Like