"Fatal error: failed to umount FUSE fs: exit status 1: fusermount: failed to chdir to /my/home/dir: Permission denied" after Ctrl-C, and cannot remount to the same mount point

What is the problem you are having with rclone?

After pressing Ctrl-C to attempt to unmount rclone, I received error

Fatal error: failed to umount FUSE fs: exit status 1: fusermount: failed to chdir to /my/home/dir: Permission denied

/my/home/dir is a placeholder for my real user home directory. I'm not sure whether the unmount operation was successful. Maybe not.

When I tried to remount to the same mount point ~/onedrive, I got error:

Fatal error: Can not open: /my/home/dir/onedrive: open /my/home/dir/onedrive: transport endpoint is not connected

If I type mount command, there is an entry of rclone onedrive:

onedrive: on /my/home/dir/onedrive type fuse.rclone (rw,nosuid,nodev,relatime,user_id=...,group_id=...)

So how can I remove this entry and remount to the same mount point?

What is your rclone version (output from rclone version)

Environment:

  • A remote Linux node (ubuntu). I am not the super user.

rclone version returns

rclone v1.50.2

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

Which cloud storage system are you using? (eg Google Drive)

Microsoft OneDrive

The command you were trying to run (eg rclone copy /tmp remote:tmp)

Environment:

  • A remote Linux node (ubuntu). I am not the super user.

This is the command to mount OneDrive:

rclone --vfs-cache-mode writes mount onedrive: ~/onedrive

Then I press Ctrl-C in hope of a clean unmount but got the error described above.

Below is one command I tried to unmount:

fusermount -u ~/onedrive

I got

fusermount: failed to chdir to /my/home/dir: Permission denied

Below is another command I tried to unmount:

umount -l ~/onedrive

I got

umount: /my/home/dir/onedrive: Transport endpoint is not connected

The rclone config contents with secrets removed.

[onedrive]
type = onedrive
token = {"access_token":"... secrets removed ...","token_type":"Bearer","refresh_token":" .. secrets removed ... ","expiry":"2021-11-06T21:11:58.82838012-04:00"}
drive_id = ... secrets removed ...
drive_type = business

A log from the command with the -vv flag

rclone -vv --vfs-cache-mode writes mount onedrive: ~/onedrive
2021/11/06 21:14:33 DEBUG : rclone: Version "v1.50.2" starting with parameters ["rclone" "-vv" "--vfs-cache-mode" "writes" "mount" "onedrive:" "/my/home/dir/onedrive"]
2021/11/06 21:14:33 DEBUG : Using config file from "/my/home/dir/.config/rclone/rclone.conf"
2021/11/06 21:14:34 Fatal error: Can not open: /my/home/dir/onedrive: open /my/home/dir/onedrive: transport endpoint is not connected

Super old version so you'd want to update that.

That means you have some process / path accessing the mounted location. You can reboot or figure out the process / kill it and unmount it.

The same problem happens for latest version v1.57.0. I have tried that already.

If you hit CTRL C and you have a process writing/reading to the location, it generates that error.

You need to stop any read/write before you try to stop the process or reboot the system....

To the best of my knowledge, I'm not reading/writing that mounting directory when I was pressing Ctrl-C. Maybe there is some hidden process that I'm not aware of. Can you please teach me how to figure out what process is reading/writing that mounting directory?

Would be easier to just reboot the server.

https://alvinalexander.com/blog/post/linux-unix/linux-lsof-command/

I'm not a root user so I can't reboot. I mentioned that twice in my question.

You don't need to be root to reboot as I don't your exact setup. You'd want to check in with your system admin to assist.

I don't have privilege to reboot. The sys admin is very disagreeable, arrogant and dismissive to contact. Recall how ncw contacted Amazon years ago about app authorization. Is there any way to unmount rclone OneDrive correctly without being a root user or contacting sys admin?

lsof ~/onedrive returns

lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/110/gvfs
Output information may be incomplete.
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/79700/gvfs
Output information may be incomplete.
lsof: WARNING: can't stat() fuse.rclone file system /my/home/dir/onedrive
Output information may be incomplete.
lsof: status error on /my/home/dir/onedrive: Transport endpoint is not connected
lsof 4.93.2
latest revision: GitHub - lsof-org/lsof: list open files
latest FAQ: lsof/00FAQ at master · lsof-org/lsof · GitHub
latest (non-formatted) man page: lsof/Lsof.8 at master · lsof-org/lsof · GitHub
usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-E] [+|-e s] [+|-f[gG]]
[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
[+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Use the ``-h'' option to get more help information.

I'm trying to figure out other commands. Are you sure I can't unmount because some process is accessing the mounting directory and therefore locking it? How about I am opening OneDrive webpage in a Windows browser?

The majority of 'easy' ways to figure it out requires more elevated access.

Best bet is to stop all processes that are yours that you can see, log out, log back in and try to fusermount the mountpoint.

If that works, great. If not, you need some sys admin help.

Is there any way, apart from Ctrl-C, to unmount rclone OneDrive correctly without being a root user or contacting sys admin?

I just shared that above.

You want to do what I asked in the previous post and run:

fusermount <mountpointname>

Replace my mountpointname with whatever your actual mountpoint name is.

I mentioned that I tried fusermount command in my question. I would appreciate it if you would read my question twice.

Again, is there any way, apart from Ctrl-C, to unmount rclone OneDrive correctly without being a root user or contacting sys admin?

I think you keep missing my point here.

If you don't want to follow the steps I've outlined, you can't be helped.

I've already answered your question a few times with the specific steps.

Good luck.