× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Kevin,

That's interesting to know. I'm used to using tcsh on FreeBSD, which gives an error "Improper umask" if you use more than the standard 9 permission bits.

(chmod, of course, does support those bits -- but not umask)

Thanks for the info.

I see the error for setting too many bits does not match what Justin is receiving. So, apparently, Tomcat is complaining about the file mode being invalid -- his umask is setting the value to something Tomcat doesn't support?

-SK


On 10/11/2016 6:03 PM, Kevin Adler wrote:
Scott, while there's standard 3-digit modes for User, Group, and Other,
you can optionally prefix it with an octal digit to specify other bits,
such as the sticky, setuid, or setgid bits.

It seems various shells handle this differently.

bash allows setting it as long as it's 0:

kadler@wernstrom:~>umask 0027
kadler@wernstrom:~>umask 1027
-bash: umask: 1027: octal number out of range
kadler@wernstrom:~>umask 2027
-bash: umask: 2027: octal number out of range
kadler@wernstrom:~>umask 4027
-bash: umask: 4027: octal number out of range

PASE bsh and ksh just ignore it:
$ umask 1027
$ umask
027
$ umask 5027
$ umask
027

It seems that QSH does not handle setting a 4-digit umask, but according
to the specification that's ok: "The interpretation of mode values that
specify file mode bits other than the file permission bits is unspecified.
" (http://pubs.opengroup.org/onlinepubs/9699919799/)

An RFE could be opened to enhance QSH for compatibility purposes (either
allow 0 or just ignore), if it was annoying enough, I guess.

"MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx> wrote on 10/11/2016
05:39:10 PM:

From: Scott Klement <midrange-l@xxxxxxxxxxxxxxxx>
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date: 10/11/2016 05:39 PM
Subject: Re: umask: 001-2111 File mode 0027 is not valid.
Sent by: "MIDRANGE-L" <midrange-l-bounces@xxxxxxxxxxxx>

Justin,

I'm not familiar with Tomcat at all... but I am familiar with umask.

I wonder why it's setting the umask to 0027? Shouldn't it be 027? I
don't understand how a umask can be a 4 digit number.

If you're not familiar with it, umask is used to turn off bits when
files are created. Normally there are 9 bits allowed, they are
organized like this: rwxrwxrwx where the first 3 bits are the read,
write and execute for the owner, the next 3 bits are read, write and
execute for the group, and the last 3 bits are read, write and execute
for everyone else (public.)

umask turns off bits that are set by the open() API when it creates a
file.

The numbers are always in octal, so each digit ranges from 0-7,
representing a group of 3 bits.

So if open() specifies octal 666 (all read/write bits on) and your umask

is 027 it will look like this: open has rw-rw-rw- and you have
----w-rwx, the result will be the owner has read,write, the group has
read only (write is turned off by the umask) and public has no authority

(all bits turned off by the umask)

I would not expect an extra leading 0 to make any difference... since it

is a leading zero, which normally does not mean anything. (One leading
zero often indicates that the number is octal.. but you wouldn't need
two.)

So maybe Tomcat 8 requires the public to have read authority, and
therefore the file mode is invalid? Or maybe it just doesn't like the
4-digit umask? I don't know -- as I said, I'm not familiar with Tomcat.

But maybe this gives you food for thought, and some options to try.

-SK



On 10/10/2016 9:26 AM, Justin Taylor wrote:
I don't see anything out of the ordinary in any of the Tomcat log
files.

I saw that I can override the umask. I just need to find the value to
use.




-----Original Message-----
From: Jack Kingsley [mailto:iseriesflorida@xxxxxxxxx]
Sent: Saturday, October 08, 2016 4:52 AM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Subject: Re: umask: 001-2111 File mode 0027 is not valid.

Justin, maybe the startup files on V7 are different than on V8.
Here are a couple of links that maybe might help in setting the
proper umask when and where you need it. Have you looked at any of
the logs outside of what is being created in the spooled files.


https://www.ibm.com/developerworks/ibmi/library/i-run-asf-tomcat-on-ibmi/

http://onjavadev.com/?p=23



Maybe you have some modified programs at startup that are being
used for V7 and not for V8.

I found this as well:

In Tomcat 8.5, this is controlled with the environment variable
UMASK. If this variable is not set when Tomcat is started, then
Tomcat will set the umask to 0027, so that files have the
permissions (rw-r-----). You can see this logic for this in Tomcat's
bin/catalina.sh file.




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.




As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.