Question on ownership and permission
Hi folks,
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. B.R. satimis |
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.
|
You could use tar to create a tarfile, burn the tarfile to cd, then untar it at the destination.
|
Hi haertig,
Tks for your advice. If I understand your advice correctly, I shall run # tar -jcf -p tarball.jz2 /path/to/data_folder burn the tarball on CD and untar it directly on CD after mounting # cd /mnt/cdrom tar -jxf tarball.bz2 -C /mnt/hdax hdax = the partition for keeping the data (to be mounted first) If I'm wrong please correct me. TIA Furthermore if I want to tar the whole partition, say "home", whether to run; # tar -jcf -p tarball.bz2 /home/* I don't expect to include the path "/home/" on the tarball. B.R. satimis |
Hi linmix,
Tks for your advice. 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. B.R. satimis |
That's where rockridge comes in. As far as I know that will do the job for you.
|
Quote:
Code:
# cd /home 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. |
Hi linmix,
Tks for your further advice. Quote:
TIA B.R. satimis |
Hi haertig
Quote:
B.R. satimis |
Quote:
|
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.
|
Hi tkedwards,
Tks for your advice. Quote:
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 B.R. satimis |
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
Code:
chown -R username:username /home/username |
Quote:
Noted with tks. satimis |
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.
|
All times are GMT -5. The time now is 07:48 AM. |