- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: rcp -p ,didn't get the same attribute
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
06-24-2005 03:12 PM
06-24-2005 03:12 PM
rcp -p ,didn't get the same attribute
I use rcp command to get lots files,
and I don't want to change files' owner after rcp finished.
So that, I add option (-p) .
After rcp finished , I checked owner who is root .
Why does that happen ?
How should I do ,that can get the same owner within files?
command is blow:
"rcp -p gbm2:/home/erpmgr/sqlnet.log . "
thank you in advance ,
KY Liu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2005 03:17 PM
06-24-2005 03:17 PM
Re: rcp -p ,didn't get the same attribute
You simply read something into rcp -p that was not there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2005 03:25 PM
06-24-2005 03:25 PM
Re: rcp -p ,didn't get the same attribute
"cp -rp" could keep permissions and owners/groups ,
but we need to clone a unix server at this weekend , we need to "rcp" for short down time.
Is any possible option for 'rcp' command funtional as 'cp -rp'?
Thanks for any tips.
Violin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-24-2005 05:05 PM
06-24-2005 05:05 PM
Re: rcp -p ,didn't get the same attribute
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2005 01:18 PM
06-25-2005 01:18 PM
Re: rcp -p ,didn't get the same attribute
One more options is let the user do rcp (not root) whose permissions are required for the files. But you may have to modify the .rhosts file.
Cheers!!!
eknath
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2005 02:04 PM
06-25-2005 02:04 PM
Re: rcp -p ,didn't get the same attribute
Thank you for your help ,
For now,I know how to do this .
KY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2005 04:31 PM
06-25-2005 04:31 PM
Re: rcp -p ,didn't get the same attribute
The functionality that is being described above is what is intended with
rcp -p. The rcp -p command (by design) doesn't allow the
preserving of the UID:GID on copied files unlike cp -p. Copying the
UID:GID across remote systems represents a security problem. The command rdist
may be used as an alternative. Consulting the manpage for rcp(1):
-p Preserve (duplicate) modification times and modes (permissions) of
source files, ignoring the current setting of the umask file creation mode
mask. If this option is specified, rcp preserves the sticky bit only if the
target user is superuser.
While, the -p option does duplicate the modification times and modes, it
does not duplicate the owner and group of the file. This will be determined, by
the UID:GID of the user executing the rcp.
Try 'rdist'
Regards
Vinod K
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2005 12:20 AM
06-26-2005 12:20 AM
Re: rcp -p ,didn't get the same attribute
Here's a technique that I often use to copy over the network:
## copying /big_dir on source-host to /big_dir on target-host,
## on target host (not source host), execute
# (remsh source-host cd / \; fbackup -i big_dir -f -) | (cd / ; frecover -r -f - )
Pay attention to the parentheses and the "\;" in the first command and simply ";" on the second. The \ escape is necesary in the first one because we want it executed by remsh on the remote (source) system. The "-f -" , means standard input/output.
Also note the 'cd' and the relative path names "big_dir" rather than absolute "/big_dir". This would allow a change of location on the target host, if desired.
E.g., suppose we wanted "/old/big_dir" to become "/new/big_dir". Then the command would be:
# (remsh source-host cd /old \; fbackup -i big_dir -f -) | (cd /new ; frecover -r -f - )
hth
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2005 07:00 PM
06-26-2005 07:00 PM
Re: rcp -p ,didn't get the same attribute
"NFS + cp -rp" could solve our problem.
and no command needs to test.
Bingo!
Violin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2005 08:24 PM
06-26-2005 08:24 PM
Re: rcp -p ,didn't get the same attribute
You can do it by,
1) cp -rp using NFS mount.
2) Before rcp a file, do like ls -l
hth.