Skip to main content

Changing default umask value for CentOS

Comments

3 comments

  • cPanelMichael
    At this point, I'm wondering if I should change the umask values back or not. It's just a lot easier to set a custom umask value then run chmod everytime I create a file or directory. Thanks.

    Hello, I suggest using the default umask values, and addressing the issue that requires you to manually adjust the permissions on new files or directories. For instance, which PHP handler are you using, and for what purpose in-particular do you change the permission values? Thank you.
    0
  • Spork Schivago
    Thank you for the response. Currently, I'm using suPHP. I plan on adding a lot of users to my system and sometimes I do stuff with root. It's a pain to always remember to make whatever files I create with root not world readable. To me, it's much easier just changing the umask value. After all, isn't that essentially what the umask value is for? I'd think if we're not supposed to change the umask value because they mess up cPanel, then maybe the cPanel scripts should be rewritten to set the umask value before creating files / directories. To me, that way makes a lot more sense. I'll change it back to the default values. Would it cause problems if I set the umask value in a .bashrc or a .bashprofile file so it only gets loaded when I login in use sudo / su?
    0
  • cPanelMichael
    It's generally advised to upload/edit/copy files for an account while logged in as that account username. That said, should you choose to modify the default umask values in your bash profile, ensure you note the suPHP permission/ownership requirements listed at: Apache PHP Request Handling - EasyApache - cPanel Documentation Thank you.
    0

Please sign in to leave a comment.