- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Default umask with "rcp"
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
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
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-02-2003 08:40 AM
тАО07-02-2003 08:40 AM
Default umask with "rcp"
Where can I change the default value for the umask ?
I`m doing a rcp and the new file get the 640 permision. My /etc/profile and my .profile have umask 002.
Why ?
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 08:44 AM
тАО07-02-2003 08:44 AM
Re: Default umask with "rcp"
HTH
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 08:45 AM
тАО07-02-2003 08:45 AM
Re: Default umask with "rcp"
rcp -p source target
File permissions on the target are not controlled by the umask in the target system's user .profile because the .profile file is NOT sourced when you rcp.
/etc/profile is also not sourced when you use these protocols.
You need to control permissions with your script. If -p doesn't help then you might need a line right after rcp to jump back on and change permissions.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 08:48 AM
тАО07-02-2003 08:48 AM
Re: Default umask with "rcp"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 08:50 AM
тАО07-02-2003 08:50 AM
Re: Default umask with "rcp"
As said, rcp -p will preserve the permissions of the file in the target system. Check the man pages for more info.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 08:51 AM
тАО07-02-2003 08:51 AM
Re: Default umask with "rcp"
What`s worng ?
p.e.
userX@hostA> remsh hostB -l userY "/usr/bin/umask"
02
userX@hostA> remsh hostC -l userY /usr/bin/umask
077
Why ?
/etc/profile and /home/userY/.profile are the same on hostB and hostC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 08:55 AM
тАО07-02-2003 08:55 AM
Re: Default umask with "rcp"
if rcp -p doesnot help you then What permission you need on the files copied?
-USA..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 09:07 AM
тАО07-02-2003 09:07 AM
Re: Default umask with "rcp"
The /sbin/rc file are the same on both hosts, why on hostB get a value and another value on hostC ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 09:55 AM
тАО07-02-2003 09:55 AM
Re: Default umask with "rcp"
man rcp
If the -p option is not specified, rcp preserves
the mode and owner of dest_file if it already
exists; otherwise rcp uses the mode of the source
file modified by the umask on the destination
host. Modification and access times of the
destination file are set to the time when the copy was made.
Check hostC throughly for change in umask. Its changing somewhere.
Do you have any other machine that comes into the picture and what is the behaviour for this script.
HTH,
Umapathy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-02-2003 10:10 AM
тАО07-02-2003 10:10 AM