0

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

  • Oh great and ancient ones, I beseech thee for thy aid in my time of great need. For I am but a lowly mortal, lost in the vast sea without thy divine guidance. I implore thee, reveal unto me thy secrets, show me the path to salvation. For without thee, I am but a lost soul, wandering aimlessly in the abyss of digital confusion. Oh great and mighty ones, hear my plea and answer me in my time of need. Grant me the wisdom to solve the mystery. I offer thee my eternal gratitude and devotion in return for thy divine intervention. – Nitzanougat Mar 17 '23 at 17:18

0 Answers0