--log-file : no such file or directory


Something drive me crazy lol

I make a script to move new file to my nas, here the script:


SDIR='/home/my_user/torrents/rtorrent/0. Complete'
TDIR='/download/0. Torrents/'

rclone "$TYPE" "$SDIR" "$rGD$TDIR" \
--config="$CONF" \
-c \
--exclude ".unionfs-fuse/**" \
--min-age 5m \

And it works, except for the log file.

I always have the message : "--log-file=/var/log/rclone_move_ds920.log: No such file or directory"

But the folder /var/log exists...

Even if I manually create a rclone_move_ds920.log, i've got the same error.

Do you see why ?

Thank you :slight_smile:

Permission issue? Need to see the actual command / full output...

yes, so :
script file : /usr/share/scripts/rclone_move_ds920.sh
make executable with chmod a+x
for testing, launch via : /usr/share/scripts/rclone_move_ds920.sh

and the result :
/usr/share/rclone_move_ds920.sh: line 15: --log-file=/var/log/rclone_move_ds920.log: No such file or directory

thanks for your help :slight_smile:

No, permissions on creating the log file for that user. Not the script.

Run the command as the user without any script and validate it works.

Sorry. I run the command without script an it works perfectly, the log is created.

I give the good permission and know it works...
I thought I had done so

Sorry for the inconvenience anf thank you for your help :slight_smile: