I opened my terminal then typed umask 022 then I tried all 3 editors but everytime I create a folder the permission becomes 775(I want 755) and the files become 664(I want 644)

Is there a way to set umask for my code editors?

  • 1
    What is the relevance of the php tag? Are you running your editors in a browser? If so, umask needs to be set in the web server that is handling the PHP. Setting it in a terminal applies only to that shell and its progeny. – AFH Sep 14 '17 at 14:15
  • sorry about that wrong tag. I just thought it would be relevant since my apache wont execute php files if they are not on 644 permissions. EDIT: removed php tag – anaval Sep 14 '17 at 15:13
  • Are you running the editors from your terminal or from the application menu? – AFH Sep 14 '17 at 15:19
  • from an application. vscode/sublime/atom are all GUI editors – anaval Sep 14 '17 at 15:54
  • You need to start your editor and check which process launched it. I'm struggling to understand how on Ubuntu my terminal starts up with umask 0002: I ran grep -r umask /etc and every instance sets it to 0022 - there are no settings in ~/.*. – AFH Sep 14 '17 at 16:41

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.