So, I have a bash script "get-data.sh that runs other two python scripts
#!/bin/bash
scripts=/root/scripts
datos=/root/zabbixdata
fecha=$(date +"%Y_%m_%d")
sudo $scripts/filesystem.py > $datos/filesystem_$fecha.log &
sudo $scripts/cpu.py > $datos/cpu_$fecha.log &
and when i run the script I get the following error
./get-data.sh: line 8: /root/zabbixdata/filesystem_2020_01_02.log: Permission denied
./get-data.sh: line 9: /root/zabbixdata/cpu_2020_01_02.log: Permission denied
The permissions of the python scripts:
-rwxrwxr-x 1 myuser myuser 1629 Jan 2 12:01 cpu.py
-rwxrwxr-x 1 myuser myuser 1680 Jan 2 11:06 filesystem.py
the permission of the bash script:
-rwxrwxr-x 1 myuser myuser 326 Jan 2 11:51 get-data.sh
the permission of the target directory
drwxrwxr-x 2 myuser myuser 6 Jan 2 11:43 zabbixdata
the persmission of the scripts directory
drwxrwxr-x 2 myuser myuser 93 Jan 2 12:14 scripts
It seem that I have all the permission but still I can create those file via shell scripting
any ideas?