- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- With same UMASK and username, our 2 scheduling too...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2017 11:20 PM
07-17-2017 11:20 PM
With same UMASK and username, our 2 scheduling tools are generating logs with different permissions.
Hi Everybody,
We are using 2 scheduling tools1.) Tidal and 2.) Control-M to run our jobs in schedule.
They both connect to same HPUX server and with same user ID.
However when we check the logs, we see a difference in the permission of files.
The files generated by Tidal executed scripts has 640 permission but files generated by Control-M have permission as 644.
Can someone please tell me as we need to fix it to have the permissions in sync. Anything we can change to get the permissions same.
- Tags:
- umask
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2017 07:56 AM
07-18-2017 07:56 AM
Re: With same UMASK and username, our 2 scheduling tools are generating logs with different permissi
Have you contacted Tidal (Cisco?) and Control-M (BMC) support to see if this is the expected behavior? The umask value is only effective with an interactive login. These scheduling programs would have to setup their own enviroment when they run, just like cron jobs.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2017 08:33 AM
07-18-2017 08:33 AM
Re: With same UMASK and username, our 2 scheduling tools are generating logs with different permissi
> With same UMASK and username, [...]
Whose "UMASK"? And who creates these log files?
> [...] The umask value is only effective with an interactive login.
> [...]
I wouldn't say that. I'd expect any shell to have a umask. Whether
any particular shell's umask has any effect on the permissions on these
log files depends on the program which creates the log files, about
which I know nothing.
> Have you contacted Tidal (Cisco?) and Control-M (BMC) support [...]
The people who supply these programs should know more than anyone
here (and certainly more than I).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2017 08:35 AM
07-18-2017 08:35 AM
Re: With same UMASK and username, our 2 scheduling tools are generating logs with different permissi
Which matches your umask?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2017 04:25 AM
07-19-2017 04:25 AM
Re: With same UMASK and username, our 2 scheduling tools are generating logs with different permissi
In Control-M, the permissions of the job output files (sysout files) are controlled by a Control-M agent configuration parameter, and this parameter is named differently in Control-M V7 vs. V8.
Please see: https://communities.bmc.com/docs/DOC-72852
For any other files created by the actual job scripts, you could add a command to your job scripts to explicitly set the umask to your preferred value before the commands that create the files, or add commands to the end of your job to explicitly chgrp/chmod the resulting files the way you want.
Whenever you're setting up a new job scheduler or other automation system, you might want to create a small script like this:
#!/bin/sh exec > /tmp/environment-check-$(date +%Y%m%d-%H%M%S)
echo "Command string was: $0"
echo "Command line arguments:"
for i in "$@"
do
echo "$i"
done echo "Current username is: $(whoami)" echo "id command output:" id echo "Current directory is: $(pwd)"
echo "Umask value is: $(umask)"
echo "TTY device is: $(tty)" echo "Locale settings are:" locale echo "Soft ulimits are:" ulimit -a echo "Hard ulimits are:" ulimit -a -H echo "Environment variables:" printenv
Then have your automation tool run this script once (i.e. schedule the script for running), and then read the resulting file in /tmp/environment-check-<timestamp>. It will tell you exactly what kind of shell environment is provided by the automation tool.
Yes, in theory the environment should match what you get by simply logging onto the system with the proper username. But in practice, some shells have a pretty complex logic on which startup scripts they run and which they don't, depending on whether the shell session is interactive (= has a TTY device associated with it) or not, and/or whether the session is started as a login shell (= first character of $0 is "-") or not.