- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: createing files with the same permissions from...
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
Forums
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
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
02-22-2005 07:17 AM
02-22-2005 07:17 AM
createing files with the same permissions from two different machines
When files are written from "A" to "C" (via purchased program) the permissions of the directories that are created are 775 and the files under that are created with 666. - GREAT! -
When files are written from "B" to "C" (via purchased program) the permissions of the directories that are created are 755 and the files under those are created with 644 - NOT GOOD -.
The user and group are created correctly from both machines.
Users on "A" and "B" are identical... same home directory, profiles....
Directory structure (for purchased program) has been copied from "B" to "A" in an effort to cause "A" to then fail also.
No luck it created files just the same as always.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 07:19 AM
02-22-2005 07:19 AM
Re: createing files with the same permissions from two different machines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 07:22 AM
02-22-2005 07:22 AM
Re: createing files with the same permissions from two different machines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 07:31 AM
02-22-2005 07:31 AM
Re: createing files with the same permissions from two different machines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 07:31 AM
02-22-2005 07:31 AM
Re: createing files with the same permissions from two different machines
Perhaps the purchase program is doing something different on one machine than the other?
Processes / programs can modify their umask so it may not be the same as when you check it from the shell prompt.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 07:37 AM
02-22-2005 07:37 AM
Re: createing files with the same permissions from two different machines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 08:25 AM
02-22-2005 08:25 AM
Re: createing files with the same permissions from two different machines
BTW this directory structure also contains the home directory for the use. Again, if I copy the directory, I also copy the home directory and therefore the profiles as well.
In the home directory, if "grep -i mask .*" the only response you get is from the .sh_history file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 08:41 AM
02-22-2005 08:41 AM
Re: createing files with the same permissions from two different machines
machine 'A' and 'B'. Another potential source of
problem could be the NFS mount permissions on
machines 'A' and 'B'.
- Biswajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 08:49 AM
02-22-2005 08:49 AM
Re: createing files with the same permissions from two different machines
The directory on "C" is exported the same to both "A" and "B".
The entries in the /etc/fstab on "A" and "B" are identical. I believe this answers your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 08:54 AM
02-22-2005 08:54 AM
Re: createing files with the same permissions from two different machines
Can you please check if umask is set in /etc/profile; /etc/default/security;
Clay is right, the only other thing I can think of is that the user on server B is using a different shell to create the file on server B.
If you create a file on server B in /tmp, what is the permission for this file.
Darrel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 09:04 AM
02-22-2005 09:04 AM
Re: createing files with the same permissions from two different machines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2005 09:28 AM
02-22-2005 09:28 AM
Re: createing files with the same permissions from two different machines
>Biswajit,
> The directory on "C" is exported the same to both
> "A" and "B".
Okay, but that's only first part of it. Are they also
mounted with same permission on both A and B ?
Make sure /etc/fstab mount permission is also exactly
same on A and B.
- Biswajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 03:08 AM
02-23-2005 03:08 AM
Re: createing files with the same permissions from two different machines
I'm a colleague of Chuck's. I've got some follow-up information for you all to consider.
The user on servers A & B (the user under whose account the "purchased program" runs) is UID 111 with GID 5. A. Clay's umask 000 test on both machines yields the same results: 666 permissions. Therefore, logic suggests that the problem does exist in the application.
However, as Chuck mentioned before, the application (contained within a single filesystem along with that user's home directory) was copied from host B to A. Therefore, the application is identical between both servers too.
There is no umask setting within either /etc/profile files, and none of the systems contain /etc/default/security.
Concerning Biswajit's idea about /etc/fstab, both /etc/fstab's contain identical lines:
Both users on A & B use the very same shell, too: /usr/bin/sh
So there you have it. We have the very same application software, very same users, very same environment produce different results.
We feel drawn to the concept that something outside of this application -- something on the HP-UX level for example -- is causing these different results.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 03:12 AM
02-23-2005 03:12 AM
Re: createing files with the same permissions from two different machines
We also tried to use tusc to trace what was going on with this problem, but I'm afraid we're not familiar enough with that tool in order to understand what we see. To compound the tracing difficulty, the "purchased program" runs two daemons even while it isn't necessarily doing anything. The second PID of these two daemons forks three other programs. It is our belief that one of these three other programs is the actual executable that produces the files with undesired permissions.
In our brief experimentation with tusc yesterday, we never saw any mention of the created files, but that may have been because we only started tusc with the PIDs of those two initial daemons. (The PID of the program that we feel actually writes the files is unknown, and it only "stays around" for a matter of moments.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-23-2005 03:20 AM
02-23-2005 03:20 AM
Re: createing files with the same permissions from two different machines
It would also be helpful to do an ldd on your application and compare via cksum each shared library used on both platforms. At some point, this application zigs on one platform and zags on the other.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 12:48 AM
02-24-2005 12:48 AM
Re: createing files with the same permissions from two different machines
After experimenting with tusc for a while, we've finally managed to capture the creation of the files in question. However, if we're interpreting tusc correctly, the files do not end up with permissions as tusc says they should.
Here's what the end result looks like. (Before running the test, /ext_dir was completely empty.)
legends: /ext_dir
# ls -alR
total 20
drwxrwxrwx 3 jetform ixossys 2048 Feb 24 08:22 .
drwxr-xr-x 23 root root 8192 Feb 7 15:49 ..
drwxr-xr-x 3 jetform daemon 96 Feb 24 08:22 ext536
./ext536:
total 6
drwxr-xr-x 3 jetform daemon 96 Feb 24 08:22 .
drwxrwxrwx 3 jetform ixossys 2048 Feb 24 08:22 ..
drwxr-xr-x 2 jetform daemon 1024 Feb 24 08:22 24022005044
./ext536/24022005044:
total 30
drwxr-xr-x 2 jetform daemon 1024 Feb 24 08:22 .
drwxr-xr-x 3 jetform daemon 96 Feb 24 08:22 ..
-rw-r--r-- 1 jetform daemon 111 Feb 24 08:22 COMMANDS
-rw-r--r-- 1 jetform daemon 11649 Feb 24 08:22 DATA.PDF
-rw-r--r-- 1 jetform daemon 293 Feb 24 08:22 IXATTR
-rw-r--r-- 1 jetform daemon 0 Feb 24 08:22 LOG
And here's every line from our tusc trace that has the phrase "/ext_dir" in it or around it:
stat(0x40006860, 0x7f7f1248) .............. [entry]
stat("/ext_dir", 0x7f7f1248) .............. = 0
stat(0x7f7f0fb0, 0x7f7f1248) .............. [entry]
stat("/ext_dir/ext536", 0x7f7f1248) ....... ERR#2 ENOENT
mkdir(0x7f7f0fb0, 0775) ................... [entry]
mkdir("/ext_dir/ext536", 0775) ............ = 0
stat(0x7f7f0fb0, 0x7f7f1248) .............. [entry]
stat("/ext_dir/ext536", 0x7f7f1248) ....... = 0
stat(0x7f7f10b8, 0x7f7f1248) .............. [entry]
stat("/ext_dir/ext536/24022005044", 0x7f7f1248) ERR#2 ENOENT
stat(0x7f7f10b8, 0x7f7f1248) .............. [entry]
stat("/ext_dir/ext536/24022005044", 0x7f7f1248) ERR#2 ENOENT
mkdir(0x7f7f10b8, 0775) ................... [entry]
mkdir("/ext_dir/ext536/24022005044", 0775) = 0
open(0x7f7f0cf8, O_WRONLY|O_CREAT|O_TRUNC, 0666) [entry]
open("/ext_dir/ext536/24022005044/ar3DA3421DD50A31a.dat", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
open(0x80000001001b81d0, O_RDONLY, 0666) .. [entry]
open("/ext_dir/ext536/24022005044/ar3DA3421DD50A31a.dat", O_RDONLY|O_LARGEFILE, 0666) = 4
open(0x80000001001b6290, O_RDONLY, 0666) .. [entry]
open("/ext_dir/ext536/24022005044/ar3DA3421DD50A31a.dat", O_RDONLY|O_LARGEFILE, 0666) = 4
open(0x80000001001b8250, O_WRONLY|O_CREAT|O_TRUNC, 0666) [entry]
open("/ext_dir/ext536/24022005044/jfixosa0.pdf", O_WRONLY|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 5
open(0x40005bd0, O_RDONLY, 0666) .......... [entry]
open("/ext_dir/ext536/24022005044/jfixosa0.pdf", O_RDONLY, 0666) = 4
open(0x40005bd0, O_RDONLY, 0666) .......... [entry]
open("/ext_dir/ext536/24022005044/jfixosa0.pdf", O_RDONLY, 0666) = 4
open(0x40005d78, O_RDONLY, 0666) .......... [entry]
open("/ext_dir/ext536/24022005044/DATA.PDF", O_RDONLY, 0666) ERR#2 ENOENT
lstat64(0x40005d78, 0x7f7f19f0) ........... [entry]
lstat64("/ext_dir/ext536/24022005044/DATA.PDF", 0x7f7f19f0) ERR#2 ENOENT
rename(0x40005bd0, 0x40005d78) ............ [entry]
rename("/ext_dir/ext536/24022005044/jfixosa0.pdf", "/ext_dir/ext536/24022005044/DATA.PDF") = 0
open(0x7f7f0f90, O_WRONLY|O_APPEND|O_CREAT, 0666) [entry]
open("/ext_dir/ext536/24022005044/IXATTR", O_WRONLY|O_APPEND|O_CREAT, 0666) = 4
open(0x7f7f1118, O_WRONLY|O_CREAT|O_TRUNC, 0666) [entry]
open("/ext_dir/ext536/24022005044/COMMANDS", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
open(0x7f7f0f90, O_WRONLY|O_CREAT|O_TRUNC, 0666) [entry]
open("/ext_dir/ext536/24022005044/LOG", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 4
unlink(0x7f7f0cf8) ........................ [entry]
unlink("/ext_dir/ext536/24022005044/ar3DA3421DD50A31a.dat") = 0
I assume that those "0775" and "0666" references are the directory/file permissions. But if so, how can the end result look different from the trace?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 01:05 AM
02-24-2005 01:05 AM
Re: createing files with the same permissions from two different machines
Check this doc.
Europe
http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062936612
US
http://www2.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062936612
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 01:25 AM
02-24-2005 01:25 AM
Re: createing files with the same permissions from two different machines
Interesting idea... thanks for sharing it, but it doesn't look like it's applicable here.
For one, the file referenced in the link (/etc/netlinkrc) doesn't even exist on the NFS server ("legends").
However, to remove any possibility of doubt, I unmounted /ext_dir from both servers that host the application. That left me with a simple local directory, /ext_dir.
I then reran my test. One host yields the 666 permissions and the other host yields 644. In other words, the exact same results are generated when an NFS mountpoint is involved as well as when no NFS mountpoint is involved.
This is quite a puzzler, eh? :(
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 01:30 AM
02-24-2005 01:30 AM
Re: createing files with the same permissions from two different machines
# grep umask /sbin/init.d/inetd
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 01:47 AM
02-24-2005 01:47 AM
Re: createing files with the same permissions from two different machines
The output of your request, on all 3 servers in question is the same......
# grep mask /sbin/init.d/inetd
mask=`umask`
umask 000
umask $mask
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 02:00 AM
02-24-2005 02:00 AM
Re: createing files with the same permissions from two different machines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 02:47 AM
02-24-2005 02:47 AM
Re: createing files with the same permissions from two different machines
We looked for ulimit(), chmod(), and fchmod() calls in the trace file, but found none.
However, we did find four umask() calls, and sure enough, on one host, these umask calls were set to 022 and on the other host, they were set to 0.
This definitely points to a difference in system configuration, but we can't imagine anything that we've done on the OS level over the past year or so that would account for anything like this. (We keep a change log, but we can't imagine anything done that would cause this.)
Is there any way to determine exactly why these umask() calls are different?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 03:02 AM
02-24-2005 03:02 AM
Re: createing files with the same permissions from two different machines
Of course, now that you have got this puppy analyzed to this level, by far, the most expeditious approach would be to contact the developer. I suppose that approach is too radical.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-24-2005 04:04 AM
02-24-2005 04:04 AM
Re: createing files with the same permissions from two different machines
First, let me say that Chuck & I really appreciate the help we received from everyone -- A. Clay, Patrick, Biswajit, Darrel, and Robert-Jan. I know Chuck reads the HP Forums almost daily, and we both get tremendous worth from everyone's postings.
Learning about the tusc utility was a great experience. I really think that's going to come in handy in the future.
I think the explanation of our problem might prove useful to others, simply because it doesn't necessarily seem limited to our application.
From the very beginning of this journey, we were focused in on the differences between the two servers which hosted our application. But the thing that ultimately explained the differences in output turned out to be the method by which the application was started.
Our application has its start script in /sbin/init.d, like so many other applications. During system startup, /sbin/rc encountered its start link (from /sbin/rc3.d/S950...) and properly followed the application's instructions. Careful examination of /sbin/rc will show a "umask 022" on line 15.
During our testing, however, when we would try to "change one thing" / "test one thing", we would routinely execute the start script in /sbin/init.d by hand (to first stop it, then start it). Our root accounts apparently have a default umask of 00, so this umask setting was in effect during our restarts, rather than /sbin/rc's umask setting in effect during system startup.
I just included an explicit "umask 00" within the application's /sbin/init.d startup script, and we're going to test it during a full reboot in a few minutes.
Again... thanks everyone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-17-2005 01:32 AM
03-17-2005 01:32 AM