ERROR : Failed to create vfs cache - disabling: failed to make cache directory: permission denied

Hi.

So I'm trying to get rclone working on my laptop. went through all configuration indications and everything is ok. but when I want to mount the OneDrive get the following error: ERROR : Failed to create vfs cache - disabling: failed to make cache directory: make cache directory failed: mkdir /home/ugly-kid-rigo/.cache/rclone/vfs/OneDrive: permission denied

Now this is totally clear to me, I don have permission for this, the question is, how do I acquire it?
The command I used was:

rclone mount OneDrive:path /home/ugly-kid-rigo/OneDrive --vfs-cache-mode writes

I'm using
rclone v1.53.3

  • os/arch: linux/amd64
  • go version: go1.15.5

I've tried looking for this topic on the forums but no luck finding the solution I need. thanks in advanced

hello and welcome to the forum,

this is a linux permissions issue, not really a rclone issue.
the user that runs rclone needs permission to that folder.
i think chmod 777 will work but perhaps too permissive.
perhaps chmod 755

if you need help with that, we have linux experts, who should stop by soon.

ok tried chmod 777 just like you told me too. No problem and then I ran again the rclone mount command, but same message

ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ chmod 777 /home/ugly-kid-rigo/OneDrive
ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ rclone mount OneDrive:path /home/ugly-kid-rigo/OneDrive --vfs-cache-mode writes
2020/12/25 16:36:21 ERROR : Failed to create vfs cache - disabling: failed to make cache directory: make cache directory failed: mkdir /home/ugly-kid-rigo/.cache/rclone/vfs/OneDrive: permission denied

that folder, rclone needs permission to it.
chmod -R 775 home/ugly-kid-rigo/.cache/rclone/

ooohhh........got it. I've enter the SU password when I tried to enter the folder so the lock icon was removed. I'll try again see if this works

Ok. so thanks to you I understand now why rclone its not mounting my onedrive account in ubuntu. But Iḿ really stuck with the permission

Iǘe tried the following with the following results:

ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ chmod 777 /home/ugly-kid-rigo/.cache/rclone
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone': Operation not permitted
ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ chmod -R 775 /home/ugly-kid-rigo/.cache/rclone
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone': Operation not permitted
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone/webgui': Operation not permitted
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone/webgui/plugins': Operation not permitted
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone/webgui/plugins/config': Operation not permitted
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone/webgui/plugins/config/availablePlugins.json': Operation not permitted
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone/vfs': Operation not permitted
chmod: cannot read directory '/home/ugly-kid-rigo/.cache/rclone/vfs': Permission denied
chmod: changing permissions of '/home/ugly-kid-rigo/.cache/rclone/vfsMeta': Operation not permitted
chmod: cannot read directory '/home/ugly-kid-rigo/.cache/rclone/vfsMeta': Permission denied
ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$  chmod -rwx home/ugly-kid-rigo/.cache/rclonechmod: cannot access 'home/ugly-kid-rigo/.cache/rclone': No such file or directory

That last one I went to the internet to check some instructions on how to use chmod. no luck.

Maybe sudo? what do you think?

you changed the location???
from
/home/ugly-kid-rigo/.cache/rclone
to
home/ugly-kid-rigo/.cache/rclonechmod
and i think you need a leading slash /home

No...thatś just how it pasted...my bad

ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ chmod -rwx home/ugly-kid-rigo/.cache/rclonechmod: cannot access 'home/ugly-kid-rigo/.cache/rclone': No such file or directory

that's what showed after the last chmod command

did you read my last post?

yes. The last post I read was the one where you pointed out that I was missing a slash /home. is that the one?

yes, that is the one
i would use /home/ugly-kid-rigo/.cache/rclone

Ok here's what I just did.

gly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ sudo chmod -rwx /home/ugly-kid-rigo/.cache/rclone
chmod: /home/ugly-kid-rigo/.cache/rclone: new permissions are ----w----, not ---------
ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ rclone mount OneDrive:path /home/ugly-kid-rigo/OneDrive --vfs-cache-mode writes
2020/12/25 17:21:27 ERROR : error reading available plugins: Error creating : /home/ugly-kid-rigo/.cache/rclone/webgui/plugins/config
2020/12/25 17:21:30 ERROR : Failed to create vfs cache - disabling: failed to make cache directory: make cache directory failed: mkdir /home/ugly-kid-rigo/.cache/rclone/vfs: permission denied

To be completely honest, I do not know what that means.

not a linux expert but - removes permissions, correct?

As stated in the following webpage https://www.pluralsight.com/blog/it-ops/linux-file-permissions:

How to change directory permissions in Linux

To change directory permissions in Linux, use the following:

  • chmod +rwx filename to add permissions.
  • chmod -rwx directoryname to remove permissions.
  • chmod +x filename to allow executable permissions.
  • chmod -wx filename to take out write and executable permissions.

Note that “r” is for read, “w” is for write, and “x” is for execute.

oohhhh........stupid of me

try chmod -R 777
https://chmodcommand.com/chmod-777/

that worked. no error this time.....but the OneDrive folder is empty. My logic tells me that is because I'm only writing on the OneDrive account on line. IS that correct?

yeah!

exactly, what folder do you mean?

make sure rclone can see the files on the remote.
rclone ls OneDrive:path -vv

well...that didn't go well I think.

ugly-kid-rigo@UGLYKIDRIGO-LENOVO:~$ rclone ls OneDrive:path -vv
2020/12/25 17:43:50 DEBUG : rclone: Version "v1.53.3" starting with parameters ["rclone" "ls" "OneDrive:path" "-vv"]
2020/12/25 17:43:50 DEBUG : Using config file from "/home/ugly-kid-rigo/.config/rclone/rclone.conf"
2020/12/25 17:43:50 DEBUG : Creating backend with remote "OneDrive:path"
2020/12/25 17:43:52 ERROR : : error listing: directory not found
2020/12/25 17:43:52 DEBUG : 5 go routines active
2020/12/25 17:43:52 Failed to ls with 2 errors: last error was: directory not found

Sorry about this. And before I move any further I will try to explain what Iḿ trying to do. Basically what Iḿ trying to do is mount onedrive on my ubuntu file manager so I can see what I already have on the onedrive online account and modify it if I want to. Thatś why I chose to mount it thinking that woud do the trick.

Again thanks a lot for your patiente

when you first posted, you were asked to post the config file, redact passwords, you never did that.......

for whatever you want to mount, make sure rclone ls can see it first.

But that worked yesterday.....honestly. I could see all my folders yesterday. I do not know what happened, Sorry, I'll run config again. what i mean with i could see the folders i mean running rclone ls. anyway...Iĺl run it again