whenever someone writes a file to a ftp folder, I want to run a python script - which will parse the file and create a file with the output. thus far using incron in centos 8.2 I wasn't able to do this.
when I tried to run it directly via python i would get this in the journal
incrond []: PATH (/my_path/) FILE (my_file.txt) EVENT (IN_CLOSE_WRITE)
incrond []: (my_user) CMD (/usr/bin/python3/home/my_user/my_py_scrit.py
Then I tried calling a bash script which would run the python script but then found that i cant evan run a simple bash script like:
#!/bin/bash
touch new_test_file.txt
incrond []: PATH (/my_path/) FILE (my_file.txt) EVENT (IN_CLOSE_WRITE)
incrond []: (my_user) CMD (/usr/bin/bash /home/my_user/bash_try.sh)
I have tried the same with /bin/bash, without specifying bash path, and changing the different paths of bash in the script... none seem to work.
what am i doing wrong? any help will be appreciated