Home > Linux, Slackware > SlackBuilds :: Watch Out For umask

SlackBuilds :: Watch Out For umask

If you are building your own packages from SlackBuild scripts, then you need to make sure your umask is 022 before you start!

Because of the nature of the shared environment in which I work, I changed my default umask to 002 in /etc/profile. I’ve just discovered a big problem as a result. When directories such as $PKG/etc aknd $PKG/usr are created as part of the SlackBuild, they are created with file permission 775 as per the umask. Then when it comes to installing those directories from the package, the installer overwrites the permissions on the directories in your system with the permissions set in the package.

So, if $PKG/etc was created with 775, your /etc directory will be modified from 755 to 775 and this can do harm. This especially the case with directories such as /etc/mail which are checked by daemons for security before they run. If the permissions are too loose, the daemons don’t run.

Before you run a SlackBuild script, check that your umask is 022!!

Be Sociable, Share!
  1. No comments yet.
  1. No trackbacks yet.

Note: Commenter is allowed to use '@User+blank' to automatically notify your reply to other commenter. e.g, if ABC is one of commenter of this post, then write '@ABC '(exclude ') will automatically send your comment to ABC. Using '@all ' to notify all previous commenters. Be sure that the value of User should exactly match with commenter's name (case sensitive).