Failed to copy: mkdir /ebct4u8k0v8o0ttcvcaufbhjd0: permission denied

Hi everybody,

I’m new on this forum and I need to make a question about rclone via .sh.

I’ve made a simple bash file to upload a file when a torrent is finished.

LOGFILE="/srv/logfolder/upload.log"   
FROM="/from_directory/torrent_complete/"
TO="secret_drive:Films"

# Drive upload
start=$(date +'%s')
echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD STARTED" | tee -a $LOGFILE
rclone copy "$FROM$TR_TORRENT_NAME" "$TO" --default-permissions --auto-confirm --log-file=$LOGFILE
echo "$(date "+%d.%m.%Y %T") RCLONE UPLOAD FINISHED IN $(($(date +'%s') - $start)) SECONDS" | tee -a $LOGFILE

So when a torrent is finished, on my log file I’ve got Failed to copy: mkdir /ebct4u8k0v8o0ttcvcaufbhjd0: permission denied.

Files has chmod 777 permissions and don’t know what to do…

It looks like wherever the copy is going it can’t make a directory and that looks to be some / area.

What OS? Can you run the command without the script and see what it does?

I’m running the script under openmediavault from raspberry. If I execute same command on command line it works perfectly (sudo user)

rclone copy /srv/nas_1/torrent_dir/torrent_file.ext secret_disk:Directory --auto-confirm