Rclone in Samba

Hi all,

I've been looking around for a couple of days now for a solution to get my mounted gdrive in samba. I want to share this cloudstorage with my daughters on Win10 PC's. The samba share for the two SSD's on my Raspberry Pi 4B are working great and the share of my gdrive is showing but I keep getting the No Acces error no matter what I do.

Fout

I'm not 'all that' on Linux system and all I'm doing is reading (a lot..) en copy/paste and test if I'm doing ok. I'm new on Rclone and it seems like a perfect solution for us.
I followd the specific instructions on a fresh Debian Buster install on my new Raspberry Pi 4B
and it's up-n-running. Last thing I want/need is to get my gdrive setup working in my sambaconfig.
If there's anyone who's willing to give me some advice, please be a little patient and give me some specific instructions.

For the initial install I used the curl https://rclone.org/install.sh | sudo bash so I gues I'm on the latest stable version of Rclone. Like I said, it's working great on my Pi.

rclone v1.51.0
- os/arch: linux/arm
- go version: go1.13.7

In my smb.conf I have setup the samba for my first HDD as:

[Backup]
path=/media/pi/Backup
writeable=Yes
create mask=0777
directory mask=0777
public=no

For my mounted gdrive I'm using:

[Google Drive]
path=/home/pi/mnt/gdrive
writeable=Yes
create mask=0777
directory mask=0777
public=no

I'm thinking it must be something small I'm missing because Google Drive is allready showing in my samba network:

Any help would be great! My wife kills me if I don't have a solution this weekend :smile:

Thanx in @vance guys!

hello and welcome to the forum,

you should not share a folder that has a space character in it.
it just complicates things on windows.
change it to googledrive

and have you tried to connect to the share on the command line?
if so, what is the command you tried?
net use x: \\server\googledrive /user:username password

are you able to connect to the share named backup?

Hi asdffdsa,

Thanks for your reply and this warm welcome.
I renamed the folder to GoogleDrive. No succes but thats was a good one for sure.
Tried to use the commandline (thinking you mean on Win 10?) Made GoogleDrive X and used pi en psw. No succes.However...

CommandLine
I suddenly was able to connect with a different user/pasw and tried some things.

Netwerkreferenties

Still no succes. Thanks so far!
Yes I am able to connect to Backup. This is an USB SSD. One other thing though.
when I use Gnome to list my disks all my drives are listed but not the gdrive. But gdrive is not a physical drive.
Gnome

One other strange thing. In the second picture of my orginal post there's a Pi folder. I'm also able to log in and even see the mnt folder. It's empty? There should be the gdrive, right?

i see that you are using a samsung T5, i have a couple of those and they are super fast.

what you mean I suddenly was able to connect with a different user/pasw and tried some things.
what were you able to connect to?

so what we have is, i think is:

  1. the win can mount the \server\backup
  2. the win cannot mount the \server\googledrive
  3. on the pi, using gnone you cannot see the mounted gdrive

on windows, when trying to net share a rclone mount command, that can be tricky for a few reasons.

  1. the mount command itself.
  2. need to use a recent version of winfsp, so i would make sure your pi is updated.
  3. the rclone mount command must be run as the system user

i am going to guess that on the pi, there are some security permissions issues.

from the pi, can you share the mount command you are using?

At first the only thing showing when I was connecting to the folder GoogleDrive was

Fout

Then, when I made a networkconnextion and added GoogleDrive to driveletter X I had to log in
Netwerkreferenties

None of the credentials I used could open GoogleDrive folder though. So I agree that there must be soms permission issues.
All I did was following the instructions here as they were provided.
So mouting gdrive for me was:

mkdir -p mnt/gdrive
rclone mount gdrive: $HOME/mnt/gdrive

Does this help?
Thanks for helping!

ok, now we are at the point to determine this is not a windows issue.

i would add these two command to the rclone mount and run the command again.
you should add these two flags.
--vfs-cache-mode=writes
--allow-other

if that does not work, we need a linux expert to help.
let me know and and i can summon on for you.

for the folder /mnt/gdrive
does the folder exist?
if so, it is empty?

from the pi command line, what do you get with this command?
`ls -l ~/mnt/gdrive

why are doing this command?
mkdir -p mnt/gdrive
not sure that is correct
on windows, that would cause the mount command to fail.
FUSE file system: mount point in use.

did you ever create a rclone log file with debug info?
we need that
add --log-level=DEBUG --log-file=/path/to/local/folder/log.txt
and post the log

Is this what you mean?

rclone mount gdrive: $HOME/mnt/gdrive --vfs-cache-mode=writes

This is the return I get

2020/03/08 16:42:24 Fatal error: Directory is not empty: /home/pi/mnt/gdrive If you want to mount it anyway use: --allow-non-empty option

On the second one I get the same result:

rclone mount gdrive: $HOME/mnt/gdrive --allow-other

Am I doing this right?

you need to combine all the flags i gave to you into one command,
and post the rclone log file.

you need to post the log file with debug info in it.

i would delete that folder ~/mnt/gdrive
and do not use --allow-non-empty

[quote="asdffdsa, post:7, topic:14783, full:true"]
for the folder /mnt/gdrive
does the folder exist? Yes
if so, it is empty? Not on the Pi. In the Pi windowsshare it is empty

from the pi command line, what do you get with this command?
`ls -l ~/mnt/gdrive
This is what I get: Both folders are on Google Drive

drwxr-xr-x 1 pi pi 0 mrt 2 17:18 'Documenten van'
drwxr-xr-x 1 pi pi 0 mrt 2 17:43 "Foto's"

why are doing this command? Only because it was in the instruction I used
mkdir -p mnt/gdrive
not sure that is correct
on windows, that would cause the mount command to fail.
FUSE file system: mount point in use. So how do I solve this?

did you ever create a rclone log file with debug info?
we need that and post the log
I don't think I am doing this right. I'm doing:

rclone mount gdrive: $HOME/mnt/gdrive --log-level=DEBUG --log-file=home/pi/Documents/log.txt

I'm getting:
2020/03/08 17:14:36 Failed to open log file: open home/pi/Documents/log.txt: no such file or directory

Sorry for my lowlevel understanding of Rclone or Debian

i would delete that folder ~/mnt/gdrive.

each time you run the command make sure to delete the log.txt file.
it will fill up quickly and get confusing.

rclone mount gdrive: $HOME/mnt/gdrive --allow-other --log-level=DEBUG --log-file=home/pi/Documents/log.txt

and post the log

You mean like this?
rclone mount gdrive: $HOME/mnt/gdrive --allow-other --vfs-cache-mode=writes

I'm getting:

2020/03/08 17:19:49 Fatal error: Directory is not empty: /home/pi/mnt/gdrive If you want to mount it anyway use: --allow-non-empty option

  1. for now, --vfs-cache-mode=writes is not needed.

  2. i would delete that folder ~/mnt/gdrive .

  3. each time you run the command make sure to delete the log.txt file.
    it will fill up quickly and get confusing.

  4. rclone mount gdrive: $HOME/mnt/gdrive --allow-other --log-level=DEBUG --log-file=home/pi/Documents/log.txt

and post the log

When I use this command I'm getting:
2020/03/08 17:26:38 Failed to open log file: open home/pi/Documents/log.txt: no such file or directory

If there's a log file somewhere I will post it

If I delete that folder I would be deleting my Cloud Storage?

make sure the rclone mount command is not running and delete that folder.

no, it will not delete the cloud storage

do a ls home/pi/Documents and post the output.

I use a .service file (in systemd) for automounting. I deleted this, rebooted the Pi and gdrive did not mount. I deleted the folder home/pi/gdrive. It did not deleted cloud storage.

Now when I use the command as above I get:

ls: kan geen toegang krijgen tot 'home/pi/Documents': Bestand of map bestaat niet

cannot acces 'home/pi/documents': File or folder does not exist

  1. given that your command is not working, not sure i would bother systemd yet, get it working on the command line first.
  2. i think the command should have been this, noticed the extra slash in the log file path.
    rclone mount gdrive: $HOME/mnt/gdrive --allow-other --log-level=DEBUG --log-file=/home/pi/Documents/log.txt

Great, that worked. Here's the output:

2020/03/08 19:46:20 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "mount" "gdrive:" "/home/pi/mnt/gdrive" "--allow-other" "--log-level=DEBUG" "--log-file=/home/pi/Documents/log.txt"]
2020/03/08 19:46:20 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2020/03/08 19:46:20 Fatal error: Can not open: /home/pi/mnt/gdrive: open /home/pi/mnt/gdrive: no such file or directory

Not sure if this helpfull :thinking:

what worked?
as there is an error in the log?

does this folder exist? /home/pi/mnt/ and if so, what is inside it?