dragggl25 commited on
Commit
fdf1323
·
verified ·
1 Parent(s): 0f7e100

Update sync_data.sh

Browse files
Files changed (1) hide show
  1. sync_data.sh +2 -2
sync_data.sh CHANGED
@@ -60,8 +60,8 @@ with requests.get(f'$FULL_WEBDAV_URL/{latest_backup}', auth=('$WEBDAV_USERNAME',
60
  os.makedirs('/data', exist_ok=True)
61
  target_path = os.path.join('/data', 'cloudpaste.db')
62
  os.replace(db_path, target_path)
63
- # 恢复后立刻确保可写
64
- os.chmod(target_path, 0o664)
65
  print(f'成功从 {latest_backup} 恢复备份到 {target_path}')
66
  break
67
  else:
 
60
  os.makedirs('/data', exist_ok=True)
61
  target_path = os.path.join('/data', 'cloudpaste.db')
62
  os.replace(db_path, target_path)
63
+ # 恢复后立刻确保可写,使用 0o666 保证在容器中任意运行用户都有写权限
64
+ os.chmod(target_path, 0o666)
65
  print(f'成功从 {latest_backup} 恢复备份到 {target_path}')
66
  break
67
  else: