{"id":16907472,"url":"https://github.com/nielash/rclone-permissions-mapper","last_synced_at":"2026-04-04T22:32:35.883Z","repository":{"id":211897566,"uuid":"730208377","full_name":"nielash/rclone-permissions-mapper","owner":"nielash","description":"Tool to convert uid and gid between mac and linux defaults when syncing files via cloud storage using rclone sync.","archived":false,"fork":false,"pushed_at":"2023-12-11T13:22:11.000Z","size":7,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-15T12:07:10.032Z","etag":null,"topics":["bash","chown","cloud-storage","copy","gid","go","golang","linux","mac","macos","metadata","osx","permissions","rclone","rclone-sync","shell","ubuntu","uid","unix"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nielash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-12-11T12:38:54.000Z","updated_at":"2023-12-22T08:23:25.000Z","dependencies_parsed_at":"2023-12-19T01:52:47.661Z","dependency_job_id":"e2afe5d8-6261-47b0-9869-484940fcb5d5","html_url":"https://github.com/nielash/rclone-permissions-mapper","commit_stats":{"total_commits":1,"total_committers":1,"mean_commits":1.0,"dds":0.0,"last_synced_commit":"e57c374d4a156c810ddb6fa4e232b836403f9a07"},"previous_names":["nielash/rclone-permissions-mapper"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/nielash/rclone-permissions-mapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielash%2Frclone-permissions-mapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielash%2Frclone-permissions-mapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielash%2Frclone-permissions-mapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielash%2Frclone-permissions-mapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nielash","download_url":"https://codeload.github.com/nielash/rclone-permissions-mapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nielash%2Frclone-permissions-mapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31416770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T20:09:54.854Z","status":"ssl_error","status_checked_at":"2026-04-04T20:09:44.350Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","chown","cloud-storage","copy","gid","go","golang","linux","mac","macos","metadata","osx","permissions","rclone","rclone-sync","shell","ubuntu","uid","unix"],"created_at":"2024-10-13T18:47:33.337Z","updated_at":"2026-04-04T22:32:35.862Z","avatar_url":"https://github.com/nielash.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rclone Permissions Mapper\n\nTool to convert `uid` and `gid` between mac and linux defaults when syncing files via cloud storage using [rclone](https://github.com/rclone/rclone) [`sync`](https://rclone.org/commands/rclone_sync/).\n\n## Usage\n```bash\nrclone sync source:path dest:path --metadata-mapper /path/to/rclone-permissions-mapper\n```\n\nor, to see input and output:\n```bash\nrclone sync source:path dest:path --metadata-mapper /path/to/rclone-permissions-mapper -v --dump mapper\n```\n\n## Background\nThe default UID of the first regular user on macOS is `501`. On Linux, it is usually `1000`. If you [`rclone sync`](https://rclone.org/commands/rclone_sync/) a file created on one to the other (by way of a cloud storage remote) and use the [`--metadata`](https://rclone.org/docs/#m-metadata) flag (without using `sudo`), by default you will probably get an error like this one:\n\n```text\nERROR : file.txt: Failed to copy: failed to set metadata: failed to change ownership: chown /testing/file.txt.fekayen6.partial: operation not permitted\n```\n\nThis is because it is trying to `chown 1000:1000 /testing/file.txt` when actually it should be `501:20` (or vice versa.)\n\nThis tool uses rclone's new `--metadata-mapper` feature to automatically detect and correct this during the sync. It does so by simply omitting the `uid` and `gid` (when necessary) in the metadata blob it passes back to rclone, so that the default values are kept.\n\n## Installation\n[Download](https://github.com/nielash/rclone-permissions-mapper/releases) and unzip (or build from source with `go build`), and then move the executable to your `$PATH`:\n```bash\nsudo rclone moveto /Users/yourusername/Downloads/rclone-permissions-mapper-1.0-osx-arm64/rclone-permissions-mapper /usr/local/bin/rclone-permissions-mapper -v\n```\n\nTest if it's working:\n\n```bash\necho '{\"Metadata\": {\"hello\": \"world\"}}' | rclone-permissions-mapper\n```\nshould output: `{\"Metadata\":{\"hello\":\"world\"}}`\n\nYou can test what it will do by giving it different `uid` and `gid` values:\n``` bash\necho '{\"Metadata\":{\"gid\":\"20\",\"uid\":\"501\"}}' | rclone-permissions-mapper\n// on mac: {\"Metadata\":{\"gid\":\"20\",\"uid\":\"501\"}}\n// on linux: {\"Metadata\":{}}\n\necho '{\"Metadata\":{\"gid\":\"1000\",\"uid\":\"1000\"}}' | rclone-permissions-mapper\n// on mac: {\"Metadata\":{}}\n// on linux: {\"Metadata\":{\"gid\":\"20\",\"uid\":\"501\"}}\n```\n\n## Resources\n* [`--metadata-mapper` docs](https://rclone.org/docs/#metadata-mapper)\n* [rclone's handling of `uid` and `gid`](https://github.com/rclone/rclone/blob/c69eb84573c85206ab028eda2987180e049ef2e4/backend/local/metadata.go#L113-L128)\n* [Downloads](https://github.com/nielash/rclone-permissions-mapper/releases)\n* [Rclone Forum](https://forum.rclone.org/)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielash%2Frclone-permissions-mapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnielash%2Frclone-permissions-mapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnielash%2Frclone-permissions-mapper/lists"}