Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
How to retain the ownership and permission of data transferred with CD from Box-1 to Box-2. The data are originally owned by User with r/w permission. After burning the data on the CD they become read only. Copying them to Box-2 all files become read only by User and owned by Root. To get the data back to their original state involves certain work in running "chown" and "chmod".
Is there an easy way making use of CD as transfer medium retaining their orignal state, not via local network ? TIA.
I'm not 100% sure about this, but I remember seeing a setting in k3b to keep the original owner settings. Have a look under advanced settings when you open the burn dialogue.
Sorry I don't have k3b installed. Most time I use command line to create ISO image and to burn as well. mkisofs has an option (-R) to retain some additional metadata. But ISO9660 filesystem does not support same file ownership and permission attributes.
# tar -jcf -p tarball.bz2 /home/*
I don't expect to include the path "/home/" on the tarball.
satimis
The above syntax, I am not sure of. To leave "/home/" off I think you might need to the following. That's the way I've done it.
Code:
# cd /home
# tar -jcpf tarball.bz2 .
Notice that I also moved the -p option before the -f option. I think the way you had it you would create a tarfile named "-p" not "tarball.bz2". The -f option takes the next thing as the desired output filename.
But I think linmix actually has the best answer. The Rockridge extensions are supposed to preserve permissions and such. I forgot about that. Never really delved into it much actually, but now I remember reading about it since linmix mentioned it. My tar method would work, but linmix's idea might be easier and better. Research into rockridge. I'll be doing that myself after I finish typing this post. I'd forgotten about it.
That's where rockridge comes in. As far as I know that will do the job for you.
I have been searching around on "man mkzftree", "man mkisofs", etc. including googling around for examples in applying -ZF options to compress the directories and files, to create ISO image and to burn as well as to decompress the directories and files. But I could not find them. Could you please shed me some light. Pointers would be appreciated.
I have been searching around on "man mkzftree", "man mkisofs", etc. including googling around for examples in applying -ZF options to compress the directories and files, to create ISO image and to burn as well as to decompress the directories and files. But I could not find them. Could you please shed me some light. Pointers would be appreciated.
TIA
B.R.
satimis
I have no idea how this is implemented though the cli. I always use k3b and the options can be easily set there.
If you look through man mkisofs you'll see you can turn on rockridge with the -R or -r options and there are options in there for specifying the uid and gid of the files on the CD. Generally though you'll find that the ownership and even permissions on the files is usually a local thing - it doesn't translate well when moving files between systems. Just like on Windows you have to remember to remove the 'read only' attribute in Properties of any files you copy off the CD you often need to do the same in Linux.
.....Generally though you'll find that the ownership and even permissions on the files is usually a local thing - it doesn't translate well when moving files between systems. Just like on Windows you have to remember to remove the 'read only' attribute in Properties of any files you copy off the CD you often need to do the same in Linux.
I burnt /home/ of a FC3 box on CDs. /home/ was on its own partition. Then running LFS LiveCD I copied the CDs on a partition of a new HD which has 6 partitions. I'm prepared to build LFS-->BLFS on the new HD applying LFS LiveCD as host. Later I discovered all data after transferred from the CDs onto the partitions became "read only" and permission changed from User to Root. Now I need to reinstate their original state, i.e. Write/Read, User, etc. Either I have to do it manually or to recopy the data from /home/ of the FC3 box onto the partition.
I'm trying to solve my problem. Running FC3 to duplicate /home/ to the partition of the new HD to be mounted as slave, etc.? Could you or folks on the forum please shed me some light. TIA
You'd probably need to use tar like others have suggested if you really want to preserve the permissions as that's one of the things its designed for - archiving. You'd still need to make sure that the uid and gid of the relevant users where the same on both the Fedora and LFS system, or you'll still need to run
You'd probably need to use tar like others have suggested if you really want to preserve the permissions as that's one of the things its designed for - archiving. You'd still need to make sure that the uid and gid of the relevant users where the same on both the Fedora and LFS system, or you'll still need to run
If your intention was to move a whole partition, partimage would have been an easy and effective sollution. It will create a tar.gz or tar.bz file for you and even split it into manageable chunks if you need it to. It's primarily used as a backup utility, but would suit this purpose fine.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.