--log-file : no such file or directory

Hello,

Something drive me crazy lol

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

#!/bin/bash

TYPE='move'
SDIR='/home/my_user/torrents/rtorrent/0. Complete'
rGD='DS920_WebDAV:'
TDIR='/download/0. Torrents/'
CONF='/root/.config/rclone/rclone.conf'
LOG='/var/log/rclone_move_ds920.log'

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

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:

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.