Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bitnami/rclone] cannot create temp config file from environment variables #78979

Closed
vladoski opened this issue Mar 17, 2025 · 7 comments
Closed
Assignees
Labels
rclone solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed

Comments

@vladoski
Copy link

Name and Version

bitnami/rclone:1.69.1

What architecture are you using?

amd64

What steps will reproduce the bug?

  1. Pull and run bitami/rclone:1.69.1
  2. Run the image without any rclone.conf files, add your rclone configs as environment variables like RCLONE_CONFIG_<SOURCENAME>_URL
  3. Run a sync or copy rclone command between a source and another destination

What is the expected behavior?

The expected behaviour is simply to execute the copy or sync command correctly.

What do you see instead?

Config file "/config/rclone/rclone.conf" not found - using defaults
Failed to save config after 10 tries: failed to create temp file for new config: open /.rclone.conf4240129501: permission denied

Additional information

I think that the main issue is that rclone tries to create a temp config file in the user's home directory.

In bitnami/rclone, the user uid is 1001, without username where the home directory is / so rclone tries to write the config temp file in /.

I've tried following rclone docs, setting the RCLONE_CONFIG_DIR, setting XDG_CONFIG_HOME but nothing worked. It seems that rclone tries to write the temp file still in / and then moving it to its config directory.
See https://rclone.org/docs/#config-config-file

This issue does not occur with rclone/rclone:1.69.1, since its user is root.

@vladoski vladoski added the tech-issues The user has a technical issue about an application label Mar 17, 2025
@github-actions github-actions bot added the triage Triage is needed label Mar 17, 2025
@vladoski vladoski changed the title rclone cannot create temp config file from environment variables bitnami/rclone cannot create temp config file from environment variables Mar 17, 2025
@javsalgar javsalgar changed the title bitnami/rclone cannot create temp config file from environment variables [bitnami/rclone] cannot create temp config file from environment variables Mar 18, 2025
@javsalgar
Copy link
Contributor

Hi!

Thank you so much for reporting. As a workaround, could you try setting the env var HOME=/tmp?

@vladoski
Copy link
Author

Hi yes, forcing $HOME to /tmp works indeed.

To be fair this seems an rclone logging issue, mostly because I've seen that after logging those Failed to save config after 10 tries... in error, if I run rclone with -vv flags, I can see that rclone works indeed as intended, maybe because writes that temp file elsewhere after trying to write it on /.

I don't really understand why they are logging that as an error since it should be at most a warning.

I don't really know if this should be considered an image issue.

@vladoski
Copy link
Author

FYI also works by setting $TMPDIR=/tmp or RCLONE_TEMP_DIR, RCLONE_CONFIG_DIR and XDG_CONFIG_HOME to /tmp

@javsalgar
Copy link
Contributor

Hi,

Thanks for letting us know. Maybe it's worth mentioning this to the rclone devs?

@vladoski
Copy link
Author

Yes I already did that

Copy link

github-actions bot commented Apr 4, 2025

This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.

@github-actions github-actions bot added the stale 15 days without activity label Apr 4, 2025
Copy link

github-actions bot commented Apr 9, 2025

Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.

@github-actions github-actions bot added the solved label Apr 9, 2025
@bitnami-bot bitnami-bot closed this as not planned Won't fix, can't repro, duplicate, stale Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rclone solved stale 15 days without activity tech-issues The user has a technical issue about an application triage Triage is needed
Projects
None yet
Development

No branches or pull requests

3 participants