Skip to content
TalonZeng

I mounted Baidu Netdisk for Grok Bot: Mac and Linux can finally share footage

I already use Baidu Netdisk as a local media disk on my Mac. I mounted the same account on Grok Bot’s Linux computer with CloudDrive2 native FUSE, including the browser loopback block, temporary official credential sync, and a read-only-to-writable pit.

zhudi12 min read
Share
Cover diagram of Mac and Grok Bot sharing Baidu Netdisk through CloudDrive2

On my Mac, Baidu Netdisk already behaves like a local disk for video footage. Finder and other programs can open those files directly. I wanted Grok Bot's Linux computer to see the same library, so it could help with video work, without syncing the entire drive down a second time.

I compared the official credential-sync preview on my Mac and typed the CloudDrive account password in a GUI terminal. Grok Bot did the Linux install, mount and tests.

My setup: the Mac was already running CloudDrive2 Core 1.1.3. Through macFUSE 5.5 (FSKit) and rclone 1.76, it mounted the locally authenticated WebDAV endpoint http://127.0.0.1:19798/dav/ at ~/Volumes/BaiduDrive_01, with /Volumes/BaiduDrive_01 as a shortcut. The write-cache target was about 8GB, and I try to keep around 20GB free; that is not a hard quota. Credential sync was off. On Linux, Grok Bot installed official CloudDrive2 Core 1.1.3 (Web 3.1.3) as a regular user, UID/GID 1000, and mounted the drive at /home/box/cloud-drives/baidu. The work took place on 7–8 November 2026 (America/Los_Angeles, then PST). The free Basic plan documents 2 clouds and 1 local mount. Account names, tokens, signed download URLs and other private identifiers are omitted. Large-video performance was not tested.

Separate the two machine paths first#

Both machines end at the same Baidu Netdisk account. The path in the middle is different.

On the Mac, local programs see a FUSE volume. rclone then talks to CloudDrive2's locally authenticated WebDAV service, and only after that does the request reach Baidu authorization and the cloud drive itself. Linux does not need macFUSE, FSKit or launchd; it can use native FUSE directly. The extra prerequisites for a regular-user install are in the next section, following the official docs.

WebDAV plus rclone remains an untested fallback on this Linux computer. The extra rclone layer exists because that is how the Mac was already wired, not because Linux has to copy it. The rclone mount documentation is the right reference if you try that later; we did not mount that way here.

On ordinary Linux, follow the official web UI#

These steps are for a regular Linux computer, where the browser can open the local management UI. Grok Bot's computer later used the official gRPC API because of a platform restriction. That was our workaround, not a path you have to copy.

First confirm that the kernel provides FUSE and that fusermount3 is available:

bash
ls -l /dev/fuse
command -v fusermount3

Create an empty local directory, using your own path:

bash
mkdir -p "$HOME/cloud-drives/baidu"

Download the official archive for your architecture from the download page or the GitHub releases. Verify the published hash, then unpack it. Change into the extracted directory and start the program once in the foreground:

bash
tar zxvf clouddrive-2-linux-$ARCH-$VERSION.tgz
cd clouddrive-2-linux-$ARCH-$VERSION
./clouddrive

Open http://localhost:19798 in a browser on the same machine. Sign in with your CloudDrive account, not your Baidu Netdisk password.

You can add Baidu Netdisk in either official way: authorize it through the regular web UI, or use official cloud credential sync after you have reviewed the comparison and given separate consent. Do not let an empty local list overwrite the cloud copy.

Then create a mount under Mount Points. Choose the real cloud source directory and the empty local path you just created. Use your own UID and GID:

bash
id -u
id -g

We used permissions 0700. The official default is 0755; pick what you need. If you run CloudDrive2 as a regular user, the official help also asks you to install fuse3 and enable user_allow_other in /etc/fuse.conf. If you start it as root or through a distribution service, follow the official notes for that mode instead of loosening extra privileges.

Finally check that the mount is visible:

bash
findmnt "$HOME/cloud-drives/baidu"

I tried Baidu's official Linux client first#

On 7 November, Grok Bot first installed Baidu Netdisk's official Linux client 8.9.7. The current package from the public download page failed on the CDN. The same version later downloaded from the official issuecdn.baidupcs.com host, and its hash matched an independent public Gentoo Manifest before installation. The window was blank after launch. Adding --disable-gpu brought up the login UI; the official desktop file's --no-sandbox flag was not used. A 130-byte round trip then succeeded through that official client.

That only proved the GUI client could upload and download. It did not turn the cloud drive into an ordinary Linux folder. The main path switched to CloudDrive2 after that.

Install official CloudDrive2 Core on Linux#

The official help and desktop notes are straightforward: confirm /dev/fuse, download the official archive for your architecture, unpack it and run ./clouddrive. The management UI listens on 19798 by default; on the machine itself that is http://localhost:19798.

This install used the official GitHub v1.1.3 Linux x86_64 archive. It was 16054981 bytes, with SHA256:

plaintext
b1ff335f1c23f4a7b420b5f1db64ac3e9532ebe79c8ff039249602a005d4d681

The hash was checked again after download, then the archive was unpacked. The program lives under the user directory and was not registered as a system service. Startup set CLOUDDRIVE_HOME to a user-writable config directory. The official default is ~/Waytech/CloudDrive2; either location is fine.

We were conservative at first. Public docs did not describe a native loopback-only listen option, so the service was not started. I later asked for a normal startup. Grok Bot launched the official binary as a regular user, with no extra arguments, no firewall changes, no proxy changes and no attempt to publish the service on the public internet.

On ordinary Linux, the next step is to open a browser. That is where this Grok Bot computer diverged.

The service was up, but the browser could not open it#

A shell request to http://127.0.0.1:19798/ returned HTTP 200, with the HTML title CloudDrive. The browser reported ERR_CONNECTION_REFUSED for localhost and HTTP 403 for the machine's private address.

This is a restriction of the Grok Bot platform, not a general Linux problem and not a CloudDrive2 password failure.

Platform staff on the forum said the browser loopback block is intentional; the shell is unaffected. The official private-network notes also say local-egress routing does not open private networks. Reinstalling CloudDrive2, changing the port or opening a tunnel is not a fix for that policy.

We did not loosen security controls just to make the browser appear to work. On ordinary Linux, open http://localhost:19798 as the docs describe, then sign in, add a cloud and create a mount point in the web UI.

Use the official gRPC API instead#

A blocked browser does not mean the service is unusable. CloudDrive2 publishes its gRPC API:

Grok Bot generated the documented Python client and first called GetSystemInfo, which does not require a login. It returned IsLogin=false, SystemReady=true and hasError=false. The guide is labeled 1.1.2 and the installed core is 1.1.3; this read-only call was compatible.

The login is the CloudDrive account, not the Baidu Netdisk password. I typed the username and password in a GUI terminal through getpass, so the input was not echoed and the script did not print the password or token to logs. The first time I chose 2FA by mistake and cancelled; the second time I said 2FA was not enabled, and login succeeded. The token stayed in a private file. This article does not name that path or show its contents.

The idea looks like this. Use the class names from the client you generate from the official proto. Do not treat a private login script on one machine as an official installer:

python
import getpass

# Generate the client from clouddrive.proto, following the official docs
# channel = grpc.insecure_channel("127.0.0.1:19798")
# info = stub.GetSystemInfo(...)

username = input("CloudDrive account: ")
password = getpass.getpass("CloudDrive password: ")
# Login(..., synDataToCloud=False)
# Do not print the password or the token

synDataToCloud=False keeps login from quietly turning cloud sync on. Sync is a separate decision.

How the Baidu authorization arrived: temporary official cloud credential sync#

The public API can import the result of a Baidu OAuth flow. That is not the same as launching a Baidu QR-code login. A fresh OAuth run needs your own developer app and a registered callback; inventing a built-in callback is not an option. We did not register such an app, and we did not pull credentials from the Mac keychain, browser cookies or the official client's database.

Official help on Sync with cloud says that once the feature is on, cloud-storage credentials are stored on the CloudDrive account server, encrypted with the account password, and the vendor says it does not store that password. Other devices signed into the same account can receive those cloud accounts automatically. What moves is authorization, not the video library.

That changes a privacy setting that had been off, and it can include every cloud account marked as eligible to sync, not only Baidu. It needs a separate, informed yes. I agreed, and only then did we use this temporary route.

A diagram drawn from the actual comparison counts, not a software screenshot; private details are not shown.

On the Mac I reviewed the comparison myself: one Baidu account on this device, nothing in the cloud, zero conflicts. After that check, I clicked Enable sync.

On Linux, Grok Bot first ran PreviewCloudSync. It showed the same single Baidu account only in the cloud, an empty local list and zero conflicts. It then enabled sync with RemoteOverwritesLocal and the preview's expectedCloudDataVersion. The result was added 1, updated 0, removed 0.

One path is unsafe: the Linux list was empty. If that empty local list had been allowed to overwrite the cloud, the uploaded authorization could have been replaced as a whole set. That must not happen.

After the import worked, Linux sync was turned off with clearCloudData=false, so the cloud copy was kept. Turning sync off does not revoke the imported Baidu authorization. A reminder to turn sync off on the Mac had already been sent, but I had not confirmed it yet, so I cannot say both sides are off.

Read-only first, then the read-write update pit#

Once the provider was present, Grok Bot added a read-only mount: source /百度网盘, empty local directory /home/box/cloud-drives/baidu, UID/GID 1000, permissions 0700. The OS showed CloudFS, and the root metadata was readable. That matches the official mount instructions: create a mount point, and on Linux supply an empty directory plus the intended user identity. On ordinary Linux, the same thing lives under Mount Points in the web UI.

The next change was only to make that same mount writable. Calling UpdateMountPoint while it was still mounted returned PERMISSION_DENIED. The log said:

plaintext
ERROR fuse3::raw::session: mount "/home/box/cloud-drives/baidu" failed

That is not proof of a membership limit, and it is not proof that Baidu rejected the authorization. The pricing page includes one local mount on the Basic plan, and the product description says that mount supports random read and write. The account status we saw did not include a role that simply forbids writable mounts.

The fix was a normal lifecycle, not a permission bypass:

  1. Confirm that this mount had no active reads or writes.
  2. Unmount it through the official API and confirm the OS no longer had it mounted.
  3. Call the same UpdateMountPoint while it was unmounted.
  4. Call Mount again.

findmnt then showed CloudFS as writable. There was no force or lazy unmount, no sandbox flag, and no switch to root or any other security bypass.

After writes were stable, the same unmount / update-while-unmounted / mount sequence saved autoMount=true. That flag applies when the core starts. User systemd was unavailable on this computer, and a full machine reboot was not tested. Grok Bot left a regular-user helper at ~/.local/bin/start-clouddrive2. If the official process is already running, it does not start another copy. That is not a boot-time autostart guarantee.

A 135-byte round-trip check#

Once the mount was writable, Grok Bot ran an isolated test in a new folder, GrokBot-传输测试, which had not been there before. The earlier 130-byte file from the official Baidu client was not at this mounted root, so that older file was not reused as proof.

The new unique file was later renamed to grokbot-box-roundtrip-20261108-051337-1702af9c-renamed.txt. It is 135 bytes, with SHA256:

plaintext
0970b94281a5af61824338052fb3066822a22ef5dfde19df8a9f191833695c1d

A write, fsync and read-back on the mount matched. To check that this was not only local write cache, Grok Bot waited until upload staging was empty and folder disk caching for that directory was off, then used the official signed download and hashed the result. The hash matched. The signed URL contains private parameters and is not printed here.

renameat2 with NOREPLACE returned EINVAL. That means the flag is unsupported, not that permission was denied. The official RenameFile API then renamed the file. After a refresh, the old name was gone and the new name was present; another signed download and another mounted read produced the same hash. I am not going to describe a generic os.rename in application code as universally compatible with this mount.

This was a 135-byte text file. It shows that the read/write path works. It does not show that large videos have been tested.

Cache, free space and how I plan to use the mount#

The read-buffer cap at the time was the default 512MiB. That is not the same as upload staging: writing a complete file through the mount still needs local space for the whole file. I want to keep about 20GB free and had an 8GB write-cache target in mind, but those are not hard quotas, and no “reserve 20GB” setting was configured. A later disk check showed about 110GiB free. That does not guarantee a large file will fit.

My working rule is: keep shared footage in the cloud as an archive, download what I am actually editing to a local disk, then upload the finished export. Do not let the Mac and Grok Bot edit the same file at the same time. A mounted cloud folder looks like a local directory; it is still not a local SSD. Timeline playback, repeated seeking and large exports belong on local storage.

Where to look first when something breaks#

Orange cards are pits from this run, not faults every reader should expect.

Symptom

Look here first

No /dev/fuse, or a regular user cannot run fusermount3

Kernel FUSE support, fuse3, and user_allow_other in /etc/fuse.conf

The unpacked program will not start

Official package, matching architecture and SHA256

The browser cannot open localhost:19798, but the shell returns 200

On a Grok Bot-style platform, check the loopback policy; on ordinary Linux, check that the service is actually listening on 19798

The login form asks for a password

That is the CloudDrive account, not the Baidu Netdisk password

You want authorization from another device

Use the official credential-sync comparison; do not overwrite the cloud with an empty local list, and do not extract login state from a keychain or cookies

A read-only mount works, but switching it to writable returns PERMISSION_DENIED

Check whether the local log shows a FUSE mount/update failure; after confirming there is no active I/O, unmount, update, then mount again

Small writes work and large writes fail

Treat the read buffer and upload staging as separate; the default 512MiB cache is not a file-size limit

The disk is missing after a restart

Check that the service is running and that autoMount was saved; boot-time recovery needs its own test

Before changing settings, record the current mount path, whether it is read-only and whether sync is on. Before unmounting, make sure no program is using that directory as its working directory. To stop using it, unmount normally, then stop the core service.

Where things stand now#

/home/box/cloud-drives/baidu on Linux is now a native FUSE read/write mount of Baidu Netdisk. The 135-byte write, remote hash check and rename all succeeded. Linux credential sync is off, and the cloud copy was not deleted. Whether sync is already off on the Mac still needs me to confirm there.

If I put this into daily editing, the next step is to pick a real footage file and follow “download, edit locally, upload the finished export.” I am not going to treat this 135-byte result as proof that large videos already work.

Comments

No comments yet — be the first to leave one.

Related articles