First, thanks for your time if you are reading this. Main scope : backup some file each week/month on OneDrive from a VPS.
I'm having some problems with rclone when trying to use either copy or move.
I'm able to list the files/folders from my OneDrive location so i assume the configuration is fine.
I created a repository on my OneDrive, i did a snapshot, i can see the snapshot in the command line BUT i want to simply copy some files at a certain time to OneDrive OR sync the entire folder from a VPS machine.
Keep getting permision denied when i'm trying to copy/move from VPS to OneDrive location. I did some searches but i cannot find anyone with this kind of the problem.
My file is owned by root and has 777. I'm running rclone copy with root user. What i'm doing wrong ?
What is the problem you are having with rclone?
Getting "permission denied" when executing rclone -vv copy /home/test.html remote:test_folder with user "root".
Run the command 'rclone version' and share the full output of the command.
rclone v1.63.1
os/version: ubuntu 16.04 (64 bit)
os/kernel: 4.4.0-203-generic (x86_64)
os/type: linux
os/arch: amd64
go/version: go1.20.7
go/linking: static
go/tags: none
Which cloud storage system are you using? (eg Google Drive)
OneDrive
The command you were trying to run (eg rclone copy /tmp remote:tmp)
Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.
*I cannot update because i installed rclone with snap, getting this when running "rclone selfupdate " - /snap/rclone/471/bin/rclone: file is not writable, run self-update as root * If really needed i will uninstall and install again rclone.
Config file :
[remote]
type = onedrive
token = {"access_token":"my_token etc " }
drive_id = my_drive_id
drive_type = business
A log from the command that you were trying to run with the -vv flag
2023/09/15 15:45:35 DEBUG : rclone: Version "v1.63.1" starting with parameters ["/snap/rclone/471/bin/rclone" "-vv" "copy" "/home/test.html" "remote:test_folder"]
2023/09/15 15:45:35 DEBUG : Creating backend with remote "/home/test.html"
2023/09/15 15:45:35 DEBUG : Using config file from "/root/snap/rclone/471/.config/rclone/rclone.conf"
2023/09/15 15:45:35 DEBUG : fs cache: adding new entry for parent of "/home/test.html", "/home"
2023/09/15 15:45:35 DEBUG : Creating backend with remote "remote:test_folder"
2023/09/15 15:45:36 DEBUG : test.html: Need to transfer - File not found at Destination
2023/09/15 15:45:36 ERROR : test.html: Failed to copy: failed to open source object: open /home/test.html: permission denied
2023/09/15 15:45:36 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: open /home/test.html: permission denied
2023/09/15 15:45:36 DEBUG : test.html: Need to transfer - File not found at Destination
2023/09/15 15:45:36 ERROR : test.html: Failed to copy: failed to open source object: open /home/test.html: permission denied
2023/09/15 15:45:36 ERROR : Attempt 2/3 failed with 1 errors and: failed to open source object: open /home/test.html: permission denied
2023/09/15 15:45:36 DEBUG : test.html: Need to transfer - File not found at Destination
2023/09/15 15:45:36 ERROR : test.html: Failed to copy: failed to open source object: open /home/test.html: permission denied
2023/09/15 15:45:36 ERROR : Attempt 3/3 failed with 1 errors and: failed to open source object: open /home/test.html: permission denied
2023/09/15 15:45:36 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Errors: 1 (retrying may help)
Elapsed time: 0.8s
2023/09/15 15:45:36 DEBUG : 8 go routines active
2023/09/15 15:45:36 Failed to copy: failed to open source object: open /home/test.html: permission denied
Any suggestions ?
With what user i should execute rclone copy/move/sync ?
What permissions should have the file/folder i'm looking to copy/move/sync ?
I'm able to copy that specific file to a new folder in the vps machine, no probl.
Thanks for testing the snap version.
LE: Can it be related to the fact that i made the configuration with the help of a windows laptop ? I used rclone docs to get the link and authorization codes.
Any reason you are using OS released in 2015? Its end of life was 3 years ago... Not sure if latest rclone can run without issues. You could try some older version of rclone.
Also you should try rclone installed directly from Rclone downloads. Snap is heavily sandboxed environment with very strict restrictions what you can access/do and what not. It is possible that your OS configuration is "weird" (highly probable given out of date OS) or old snap is totally broken by now and your /home folder is outside of rclone/snap scope.
Im running an application (odoo) and as far i understood there are some packages needed for this app to run which are not available anymore in the latest OS. I was looking to upgrade but not sure it will work fine.
I will try to install the rclone from rclone.org directly if no solution...
I did a simple copy using cp command BUT, to make it clear : Command : rclone copy /home/test.html /test_folder Output :
2023/09/15 16:55:11 ERROR : test.html: Failed to copy: failed to open source object: open /home/test.html: permission denied
2023/09/15 16:55:11 ERROR : Attempt 1/3 failed with 1 errors and: failed to open source object: open /home/test.html: permission denied
Command : cp /home/test.html /test_folder
Output : empty , when checking with "ls" the file is there.
Odoo runs without any issues on the latest Ubuntu 22.04 LTS. Here example of "how to" install it.
If you keep using out of date OS not maintained for years with even older kernel (also dead for years) with every passing day you will face more and more issues - especially with newer software.
Sometimes there is no choice but then such machine should be left untouched as things can be easily broken beyond repair by installing new stuff. Not even mentioning that it should be as far from Internet as possible:)
Thank you for providing that. For some reason i need to run Odoo8, there is the problem with the packages.
Thanks for advices, i will look it up maybe i can find a way to make it work.
i will uninstall and come back with a clean install.
Thank you!
"I'LL BE BACK " ( joke ) --> terminator
Good news, i installed rclone with the instructions from Install
Worked from the first time. Tested also sync, works also.
Thank you very much for your quick and GREAT support!
Solution : Do not install rclone with snap. Use instructions from Install.
Offtopic : I'm planning to use copy/sync command to copy databases up to 15gb (per file ) using cron jobs , is this a good solution, can you please advise if there is a better solution ? I will need backed up files only in case something bad happens with the vps machine.
There must be a misunderstanding...sorry.
I asked an advice if the workflow im planning to implement is good or not correct. How to implement that etc, i can google it indeed.
Thanks !