Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permissions on Created File #214

Closed
thekendog opened this issue Sep 3, 2020 · 4 comments
Closed

Permissions on Created File #214

thekendog opened this issue Sep 3, 2020 · 4 comments
Labels
enhancement New feature or request webview Features/issues related to WebView-based UI

Comments

@thekendog
Copy link

Whenever I create a file it assigns 666 permissions. It should be 644.

@thekendog
Copy link
Author

Edit: Found the newFileMode setting in another issue on here. It's not in the GUI settings or documentation.

@SchoofsKelvin
Copy link
Owner

SchoofsKelvin commented Sep 4, 2020

Improvement to #39

Not a huge priority of adding a Settings UI entry for this, but I'll keep it in mind.

The 666 seems a bit weird. I can't check the code right now, but the default umask shouldn't be that.

@SchoofsKelvin SchoofsKelvin added enhancement New feature or request webview Features/issues related to WebView-based UI labels Sep 4, 2020
@MostHated
Copy link

Due to the fact that I have been making world-writable files left and right for quite some time now and didn't realize it, I think that at a minimum, it should be in the UI as up to right now, it seems the default is still 666.

@SchoofsKelvin
Copy link
Owner

SchoofsKelvin commented Dec 3, 2021

Just added this (af76438, b904fb9) to the extension. The default permission is now 0o664 (rw-rw-r--), while the UI now also has an easy table-like config field for newFileMode:
Screenshot of new field

Mind that I stuck with the default for non-root users (0o664), even for the root user (where the usual default is 0o644) as it is difficult to detect the current user within SFTP. Besides that, the terminal is (still) unaffected by newFileMode, it only affects files created through the SFTP interface, i.e. by VS Code, such as the Explorer view.

These changes will be released in the next version after the current v1.24.0, which I'll probably release later during the weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request webview Features/issues related to WebView-based UI
Projects
None yet
Development

No branches or pull requests

3 participants