IBM TechXchange Virtual WebSphere z/OS User Group

IBM TechXchange Virtual WebSphere z/OS User Group

WebSphere and JAVA continues to grow as workload on System Z. The virtual user group has been established to provide a community to share updates on technology and share customer experiences.

 View Only

Liberty z/OS Post #83- Messages.log and the Server UMASK

By David Follis posted 19 hours ago

  

This post is part of a series exploring the unique aspects and capabilities of WebSphere Liberty when running on z/OS.
We'll also explore considerations when moving from WebSphere traditional on z/OS to Liberty on z/OS.

To start at the beginning, follow this link to the first post.

---------------

This week I’m going to point out message CWWKB0121I which tells you the UMASK value for the server process.  If you’re having problems with permission bits for files created by code running in the server, you might want to know this.  Now you know how to find out what the value is. 

That’s it.  If you understand umasks you can stop right there and we’ll see you next time. 

Just in case anybody is wondering what a umask is or why you might care, I’ll save you searching for it and try to summarize.  Although, to be honest, there’s a good chance you’ll find a better explanation with a little searching…. I’ll take a shot anyway.  Mostly to make this week’s post look longer :-)

Ok, so in a Unix-y environment like z/OS USS, files in the file system have 3 sets of 3 bits that indicate permissions to access that file.  The three sets correspond to owner’s, group’s, and everyone’s permission.  The owner of a file can have different permissions than members of the owning group which can be different from “everyone else”.  The three bits in each set correspond to read, write, and execute permission.  If the bit is on then the owner/group/everybody has that permission. 

These 3 groups of 3 bits get represented as 3 digits in octal.  You remember octal right?  Your HP calculator probably has (had?) an octal mode if you’re old enough (I was a ‘TI’ person myself, but I had a roommate who was an HP guy (Hi Mark!)). 

When you create a file the way the bits get set is controlled by a thing called a umask.  You might think that it would have bits set in it that represent what permission bits should be set.  So if you want to set ‘777’ the umask would be ‘777’.  You would be wrong.  This is a mask, so it is the inverse of the bits to get set.  A umask of ‘000’ would get you bits of ‘777’.  That one is easy…as you get to real examples you’ll probably have to stop and think a moment to figure out what the inverse of the umask is.  Don’t feel bad…everybody does this. 

You might also notice that the umask value we print out has four digits.  I said there were three groups so how is the umask four digits?  Well, the first digit represents the setuid, setgid, and sticky bits.  You can definitely get better explanations of those by searching than I’m likely to give here. 

0 comments
1 view

Permalink