I have tried to solve this for many days now without any solution.
I have an ubuntu installation and run rclone within a bash script that is called from nginx server and the $USER is www-data user just before calling the rclone command. The rclone configuration file and the rclone log file both has these "permissions". What have I done wrong?
patrik@patrikserver:~$ ls -ltr /home/patrik/.config/rclone/rclone.conf
-rwxrwxrwx 1 www-data www-data 453 Oct 30 13:27 /home/patrik/.config/rclone/rclone.conf
patrik@patrikserver:~$ ls -ltr /tmp/rclone.log
-rw-r----- 1 www-data www-data 2112 Nov 1 08:03 /tmp/rclone.log
What is your rclone version (output from rclone version)
rclone v1.53.2
os/arch: linux/amd64
go version: go1.15.3
Which OS you are using and how many bits (eg Windows 7, 64 bit)
Ubuntu 20.04
Which cloud storage system are you using? (eg Google Drive)
google photos
The command you were trying to run (eg rclone copy /tmp remote:tmp)
Have this in the bash script that calls rclone:
dest="/var/www/html/recordings/test.flv"
mv $1 $dest
jag="$(whoami)"
echo "$jag" >> /tmp/temp.log
echo "$1" >> /tmp/temp.log
echo "$dest" >> /tmp/temp.log
ls -ltr $dest >> /tmp/temp.log
/usr/bin/rclone -vv --config=/home/patrik/.config/rclone/rclone.conf --log-file=/tmp/rclone.log copy $dest googlePhotoMalung:album/malungVideos
The temp.log then looks like this:
www-data
/var/www/html/recordings/malung-1604252855.flv
/var/www/html/recordings/test.flv
-rw-r--r-- 1 www-data www-data 4003477 Nov 1 17:47 /var/www/html/recordings/test.flv
sudo -i # log in as root
su - www-data -s /bin/bash
As the config command then wanted to store the config under /var/www which was denied due to root ownership i just pasted the output to another file under /var/www/html/rclone/rclone.conf where both directory and file was owned by www-data.
I still don't understand though why it did not work to have the same rclone/rclone.conf under /home/patrik/.config with the owner/permissions. Probably some error by me