- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: remsh/rcp umask issues
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
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
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
тАО04-06-2009 12:28 PM
тАО04-06-2009 12:28 PM
We're having an issue attempting to rcp a file from one system to another. When copying to any other system, the permissions are preserved, however, this one system keeps resetting them to 600 (source permissions are 644).
If we try a "remsh hostname -l userid "/usr/bin/umask", we're seeing the umask is set to 077, instead of 00.
We cannot figure out where this value is coming from. There is no umask setting in the user's .profile/.login (plus this seems to affect all users, not just specific ones), nor is there one in /etc/profile. umask is set to 022 in /sbin/rc. I've compared the umask setting in all of the scripts in /sbin/init.d/, and they are the same across working and non-working hosts.
Any help with this would be greatly appreciated. We're unable to simply use "rcp -p", as we have a compiled application with rcp hard-coded without the flag.
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2009 12:46 PM
тАО04-06-2009 12:46 PM
Re: remsh/rcp umask issues
"If the -p option is not specified, rcp preserves the mode and owner of dest_file if it already exists;"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2009 12:49 PM
тАО04-06-2009 12:49 PM
Re: remsh/rcp umask issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2009 12:51 PM
тАО04-06-2009 12:51 PM
Re: remsh/rcp umask issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2009 12:57 PM
тАО04-06-2009 12:57 PM
Re: remsh/rcp umask issues
umask is not set in .profile/.login as I mentioned in my original post. Plus, those files should not be sourced by rcp, I don't think.
Source is HP-UX 11.11, Destination is 11.31. We're seeing this behaviour with /sbin/sh and /bin/ksh. I haven't looked into csh yet.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2009 01:50 PM
тАО04-06-2009 01:50 PM
Re: remsh/rcp umask issues
I don't have an 11.31 system handy so I can't test that theory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2009 08:23 PM
тАО04-06-2009 08:23 PM
Re: remsh/rcp umask issues
remsh doesn't execute ~/.profile.
Have you looked in these rc scripts:
/sbin/init.d/clean_adm
/sbin/init.d/hppcifddi
/sbin/init.d/inetd
/sbin/init.d/kmbuild
/sbin/init.d/secsh
/sbin/init.d/syslogd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-06-2009 10:42 PM
тАО04-06-2009 10:42 PM
Re: remsh/rcp umask issues
Yes remsh is not using .profile so in this case right a script which copy your file from source to destination and change the permission.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 05:35 AM
тАО04-07-2009 05:35 AM
Re: remsh/rcp umask issues
There's nothing in inetd.conf that's setting a umask. /sbin/init.d/inetd sets umask to 000, however, this is the same on both the working and non-working systems.
Dennis,
What am I looking for with these scripts? As I mentioned earlier, the umask value for is the same on every script on both working and non-working systems.
Suraj,
Writing a script is not an answer. As I said, we have a program that is copying these files over, and we cannot modify it. Aside from that, I'd rather solve this than work around it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-07-2009 10:45 PM
тАО04-07-2009 10:45 PM
Re: remsh/rcp umask issues
This at least gives the default or starting values. When I use remsh, my umask is 0.
If it is 77, there must be some other change.
What does your /etc/inetd.conf have for rlogin?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 03:47 AM
тАО04-08-2009 03:47 AM
Re: remsh/rcp umask issues
those scripts all have the default values, the same as on the working hosts:
root # grep -i umask *
OVTrcSrv: (umask 002; /opt/OV/lbin/xpl/trc/ovtrcd)
clean_adm: mask=`umask`
clean_adm: umask 022
clean_adm: umask $mask
ems: UmaskValue=`umask`
ems: umask u=r,g=r,o=r
ems: umask $UmaskValue
ems: UmaskValue=`umask`
ems: umask u=r,g=r,o=r
ems: umask $UmaskValue
esm:umask 022
gwlmagt:umask 077
hpsmh:umask 002
hpsmh: umask 333
hpsmh: umask 002
inetd: mask=`umask`
inetd: umask 000
inetd: umask $mask
prngd.rc:umask 022
rstemsListener:umask 022
sec_mgmt:umask 077
spc:umask 077
syslog-ng: # Note. This umask is mostly paranoia. syslog-ng
syslog-ng: mask=`umask`
syslog-ng: umask 022 # u=rwx,g=rx,o=rx, disable group/other write
syslog-ng: umask $mask
syslogd: mask=`umask`
syslogd: umask 022
syslogd: umask $mask
inetd.conf has the following for remsh:
shell stream tcp6 nowait root /usr/lbin/remshd remshd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-08-2009 04:22 AM
тАО04-08-2009 04:22 AM
SolutionNice one actually.
Apparently remshd on 11.31 does NOT use the UMASK setting i /etc/default/security as it says in man. Only way I can think of to change this behaviour is to make a change to /etc/pam.conf in the section Session Management by adding bypass_umask:
Before:
rcomds session required libpam_hpsec.so.1 bypass_limit_login
After:
rcomds session required libpam_hpsec.so.1 bypass_limit_login bypass_umask
Hope this helps you,
Have a nice Easter everyone.
Cheers
Per
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 05:48 AM
тАО04-09-2009 05:48 AM
Re: remsh/rcp umask issues
I think you found it!
root # grep -i umask pam.conf
ftp session required libpam_hpsec.so.1 bypass_limit_login bypass_umask bypass_nologin
rcomds session required libpam_hpsec.so.1 bypass_limit_login bypass_umask
Thanks everyone!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-09-2009 06:01 AM
тАО04-09-2009 06:01 AM
Re: remsh/rcp umask issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2009 09:02 AM
тАО04-16-2009 09:02 AM
Re: remsh/rcp umask issues
Thanks for all the help.
- Tags:
- inetd
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2009 09:03 AM
тАО04-16-2009 09:03 AM
Re: remsh/rcp umask issues
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-16-2009 11:47 PM
тАО04-16-2009 11:47 PM
Re: remsh/rcp umask issues
Great the problems is solved. Do you still have the umask setting in pam.conf ?
My tests showed that was the solution.
Just curious.
Cheers