syncthing / syncthing/syncthing-macos
Control default new file permissions with custom umask
Nobody has claimed this yet.
- Dominant language
- Objective-C
- Stars
- 3.9k
- Forks
- 203
- Avg merge
- 3d 14h
- Merged PRs (30d)
- 2
Description
It would be very useful to be able to set a custom umask. Currently the default umask for the entire system/user is used and can't be controlled from the GUI.
I need to have "Ignore Permissions" on one of my Syncthing shares in order for it to be usable. However, when running Syncthing via the GUI, this results in it creating new files using Mac OS's default umask, which is 022. This results in new file permissions of 644 and directory permissions of 755. I would like to launch the syncthing process with umask 002, resulting in new file permissions of 664 and directory permissions of 775.
I don't think this needs to be GUI exposed. Could be a hidden preference. What I'm currently doing is running the entire Syncthing.app using a shell script that launches it in a subshell with a custom umask, but this is clunky.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how the macOS GUI launches the Syncthing process and how application preferences are read. Check whether a hidden preference can be passed to that launch path; done means the process can use umask 002 so newly created files and directories receive the requested permissions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- objective-c
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100