rclone: fix configuration saving

The following error occurs when creating storage configuration in WEBUI:
```
Failed to save config after 10 tries: failed to create temp file for new config: open /etc/rclone/rclone.conf4258227003: permission denied
```

we should set the owner of the parent directory of the configuration
file to rclone.

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
[split chown command, wrap commit message]
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Liangbin Lian 2024-04-12 11:43:46 +08:00 committed by Tianling Shen
parent 4cc56eb9e0
commit bcd87dd8b6
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
2 changed files with 2 additions and 1 deletions

View File

@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=rclone
PKG_VERSION:=1.68.2
PKG_RELEASE:=1
PKG_RELEASE:=2
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/rclone/rclone/tar.gz/v$(PKG_VERSION)?

View File

@ -58,6 +58,7 @@ start_service() {
local config_dir="${config_path%/*}"
[ -d "$config_dir" ] || mkdir -p "$config_dir"
touch "${config_path}"
chown rclone "${config_dir}"
chown rclone "${config_path}"
[ -d "/lib/upgrade/keep.d" ] || mkdir -p "/lib/upgrade/keep.d/"