Rclone with Box.com – "directory not found" error in CloudPanel backup

Nemesis

Active member
Joined
Mar 22, 2025
Messages
35
Points
61
Age
26
Hi everyone,
I'm trying to set up CloudPanel backups using Box.com through the Custom Rclone Config feature.
I believe my rclone configuration is working properly — here’s what I get with a basic listing command:

Code:
rclone lsf box:
Box App Overview.mp4
Cloud.png
SimpleShare Uploads/
backups/
server_backups/

However, when I try to set up the CloudPanel backup using the default settings, I get the following error:

Code:
Storage Directory: Command " : /usr/bin/sudo /usr/bin/rclone lsjson remote:'backups/' --log-level='ERROR' --config='/root/.config/rclone/rclone.conf'" failed, error message:
2024/04/03 03:16:48 ERROR : : error listing: directory not found
2024/04/03 03:16:48 Failed to lsjson with 2 errors: last error was: error in ListJSON: directory not found

It seems like the storage path might not be resolving correctly inside the context of the CloudPanel backup system. Possibly a path or permission mismatch?

System Info​

  • CloudPanel version: (latest, Ubuntu 22.04 install)
  • rclone version:

Code:
rclone v1.66.0 
- os/version: ubuntu 22.04 (64 bit) 
- os/kernel: 5.15.0-92-generic (x86_64) 
- os/type: linux 
- os/arch: amd64 
- go/version: go1.22.1


rclone config redacted​


Code:
[box]
type = box
token = XXX
box_sub_type = enterprise

Running with -vv flag:​


Code:
rclone lsjson box: -vv
...
{"Path":"backups","Name":"backups","IsDir":true,"ID":"256756441354"}
...

So the backups/ directory definitely exists.

Question​

Is there something I need to change in:
  • the storage path syntax (e.g., remote:'backups/')?
  • CloudPanel’s expectations for rclone structure?
  • permission or user context under which the command is run?
Has anyone managed to successfully integrate Box.com via rclone in CloudPanel backups?

Thanks in advance for any help or insights!
 
Solution
Thanks for the detailed info — this one is a bit tricky but solvable.

The issue here is likely not with rclone itself, but with how CloudPanel executes the rclone command — specifically the user context and config path.
Let’s break it down:

1. Your rclone setup looks fine​

Your output from rclone lsjson box: confirms that the backups/ folder exists and is accessible when you run the command manually as the ubuntu user.
But CloudPanel likely runs it as clp or root, and looks for the config file in /root/.config/rclone/rclone.conf, which may not exist or be incomplete there.

2. Fix: Move or copy your rclone config​

CloudPanel uses /root/.config/rclone/rclone.conf by default. Since your working...
Thanks for the detailed info — this one is a bit tricky but solvable.

The issue here is likely not with rclone itself, but with how CloudPanel executes the rclone command — specifically the user context and config path.
Let’s break it down:

1. Your rclone setup looks fine​

Your output from rclone lsjson box: confirms that the backups/ folder exists and is accessible when you run the command manually as the ubuntu user.
But CloudPanel likely runs it as clp or root, and looks for the config file in /root/.config/rclone/rclone.conf, which may not exist or be incomplete there.

2. Fix: Move or copy your rclone config​

CloudPanel uses /root/.config/rclone/rclone.conf by default. Since your working config is likely under /home/ubuntu/.config/..., you should copy it:

Code:
sudo mkdir -p /root/.config/rclone
sudo cp /home/ubuntu/.config/rclone/rclone.conf /root/.config/rclone/rclone.conf

Alternatively, edit the CloudPanel backup job and set the exact path to your rclone config under “Custom Rclone Config” settings, if supported.

3. Storage Path Format​

Make sure the path you use is valid inside rclone. CloudPanel passes something like:
Code:
rclone lsjson remote:'backups/'
In your case, that would become:
Code:
rclone lsjson box:'backups/'

Try running that exact command as root using sudo:
Code:
sudo rclone lsjson box:'backups/'

If that fails, try:
Code:
sudo -u clp rclone lsjson box:'backups/'

If these fail, the issue is definitely with how the environment (user, config file, etc.) is seen during execution.

Bonus: Using a safer config path​

Instead of relying on /root/.config, you can create a system-wide config at a known path (like /etc/rclone/rclone.conf) and point to it manually in CloudPanel.

Let me know if you try that and still get the error. I’ve run into similar issues before with other remote types — and 99% of the time it’s a config file or permission context mismatch.
Hope this helps!
 
Solution
Back
Top