-
-
Notifications
You must be signed in to change notification settings - Fork 844
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
spawned processes have umask = 0077 #416
Comments
I suspect that you might have an issue with your For example; try the following and share the output:
Compare that with eg: Terminal.app wezterm doesn't know anything about |
I am aware the wezterm does not know anything about brew. But something is off. I already killed two MAC laptops, I started to set up. Then I added wezterm, and oops. All chaos. I had to go to recovery mode and fix the file permissions manually. Both had the same issues. I find that terribly bad. Unless I could be wrong and it was brew. But wait a minute I also downloaded MySQL from website install, not the brew version, and it also managed to do something to the permissions, of those folders. Not the installers, but when I ran commands from the terminal to setup MySQL setup, So right now, my suspicion is wezterm. My second suspicions could be a new shitty macOS issue with Catalina and Big Sur, where macOS systems a becoming more and more unstable with every new macOS release. |
At this point there's not much for me to go on. I asked for you to run some basic commands to help prove/disprove the most likely source of permissions that anyone using a shell in a terminal is likely to face; until I see that I have no concrete information on what is happening. Beyond that, the way that terminals and shells work, it is "impossible" for there to be any additional side effects bleeding down from the terminal emulator after the shell is started. From what you've described, I would suspect that something went wrong with installing some of the other software you mentioned: that seems like a much more likely candidate, especially if you are using Please keep in mind that none of the other users of wezterm have run into behavior that is similar to what you have described. |
When executing Edit: for |
Sorry, it took me long to respond, but I was busy fixing those laptops. touch (wezterm) In Linux Fedora, there seems to no issue. touch (wezterm) In conclusion, installing anything in a macOS using from inside wezterm, now, it will mangle the file systems terribly. I had to reset the harddrive and reinstall the entire system in one and the other just the entire /usr had to be recreated mainly. Could it be a Rust problem ? |
wezterm sets a more restrictive umask (`0o077`) by default so that any files that it creates (eg: unix domain socket, log files) are more secure by default. However, some environments rely on the more general default of (`0o022`) without checking that it is set. This matters because programs spawned by wezterm inherit its more restricted umask. I hadn't noticed this because I've had `umask 022` in my shell RC files since sometime in the 1990's. This commit adds some plumbing to the pty layer to specify an optional umask for the child process, and some more to our umask saver helper so that any thread can determine the saved umask without needing a reference to the saver itself, which may be in a different crate. The logic in the config crate has been adjusted to connect the saved value to the default command builder arguments. The net result of this is that running `wezterm -n start bash -- --norc` and typing `umask` in the resultant window now prints `0022`. refs: #416
wezterm sets I hadn't noticed this because I've had I would recommend that you also put I've pushed a commit that restores the umask to whatever it was set to by the process that spawned wezterm so that this should be less surprising. FWIW, if a software installation process is sensitive to umask, I would consider it a bug in the installer; the umask isn't required to have any particular value (if it was, it wouldn't be a feature of unix systems; it would just be hardcoded) and security conscious unix users do often set a more restrictive umask. |
@wez This issue seems reoccur recently?
|
@tntljc please file a separate issue and include all of the information requested by the form, thanks! |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further. |
Describe the bug
using a mac. actually I could replicate in two macs. while using wezterm, all the permissions for file and folders got lost to user 501. and permissions blocked to rw- --- --- so, it breaks the entire mac systems.
Environment (please complete the following information):
To Reproduce
Steps to reproduce the behavior.
open wezterm
start installing brew or mysql or anything, and watch your system become unstable
check the rights of /usr/local/Cellar for example or anything you installed would be ruined, blocked or not accessible
Configuration
no file
Expected behavior
Expected to be able to use it normally with no repercutions
Screenshots
NA
Session Recording
NA
Additional context
@wez @dsp @misaelnieto
The text was updated successfully, but these errors were encountered: