HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- cpio not preserving permissions on Redhat
Operating System - Linux
1829012
Members
2375
Online
109986
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
09-06-2007 07:55 AM
09-06-2007 07:55 AM
cpio not preserving permissions on Redhat
Trying to cpio data from one server to the other as follows...
On target server:
1. mount:/source_dir /mnt
2. cd /mnt
3. find . -print | cpio -pdlvmu /destination
Everything does get copied... but I get the below error as well as the "/destination" directory permissions change from 755 to 700 on the target directory.
cpio: cannot link: Invalid cross-device link. I only see this on Redhat, not Solaris or AIX. Any help would be greatly appreciated.
On target server:
1. mount
2. cd /mnt
3. find . -print | cpio -pdlvmu /destination
Everything does get copied... but I get the below error as well as the "/destination" directory permissions change from 755 to 700 on the target directory.
cpio: cannot link
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2007 08:27 AM
09-06-2007 08:27 AM
Re: cpio not preserving permissions on Redhat
Shalom,
Default permissions on the NFS server may be overriding the settings.
Try tranferring the file and uncompressing it on the other system. If permissions are still screwed, then update red hat to the latest patch level.
SEP
Default permissions on the NFS server may be overriding the settings.
Try tranferring the file and uncompressing it on the other system. If permissions are still screwed, then update red hat to the latest patch level.
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
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
09-06-2007 10:09 AM
09-06-2007 10:09 AM
Re: cpio not preserving permissions on Redhat
Shalom to you... not sure what that's going to prove? Where on the NFS server can I change these settings? Even if the cpio to a tar file and then un-tar to the destination works, what does that prove? thx.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-06-2007 06:55 PM
09-06-2007 06:55 PM
Re: cpio not preserving permissions on Redhat
Are you running these commands as an ordinary user, or as root?
What kind of filesystem is the /destination?
What does "grep /destination /proc/mounts" say?
Background:
Linux supports many non-unixlike filesystems. Some of the supported filesystems simply cannot store unix-style file permissions, so the unix-style permission information is auto-generated when needed using a simple algorithm. In these cases, the mount options of the filesystem will dictate the permissions of each file and directory on that filesystem. This is most often encountered with FAT or VFAT filesystems.
"Invalid cross-device link" means that cpio is trying to create a hard link, but on the destination the link "source" and "target" are on different filesystems: one is on the NFS volume and the other is local. In this situation, creating a hard link is impossible in any Unix-like system.
You're using option "l" with the cpio command: it means "link files instead of copying them, when possible". If you omit this option, the "invalid cross-device link" messages should go away.
RedHat uses GNU cpio, which may be slightly different from the version of cpio used on Solaris or AIX. If you're more familiar with those other architectures, I recommend you check the documentation of the GNU cpio before using it:
http://www.gnu.org/software/cpio/manual
MK
What kind of filesystem is the /destination?
What does "grep /destination /proc/mounts" say?
Background:
Linux supports many non-unixlike filesystems. Some of the supported filesystems simply cannot store unix-style file permissions, so the unix-style permission information is auto-generated when needed using a simple algorithm. In these cases, the mount options of the filesystem will dictate the permissions of each file and directory on that filesystem. This is most often encountered with FAT or VFAT filesystems.
"Invalid cross-device link" means that cpio is trying to create a hard link, but on the destination the link "source" and "target" are on different filesystems: one is on the NFS volume and the other is local. In this situation, creating a hard link is impossible in any Unix-like system.
You're using option "l" with the cpio command: it means "link files instead of copying them, when possible". If you omit this option, the "invalid cross-device link" messages should go away.
RedHat uses GNU cpio, which may be slightly different from the version of cpio used on Solaris or AIX. If you're more familiar with those other architectures, I recommend you check the documentation of the GNU cpio before using it:
http://www.gnu.org/software/cpio/manual
MK
MK
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP