You are not logged in.
Hi. I'm trying, using the command line to copy some files to a usb drive in such a way that all attributes are preserved. I tried
cp -p src dest
rsync -a src dest
but both of these fail to preserve the permissions.
However, if I just do a Ctrl-C and Ctrl-V using Thunar, everything gets preserved. Any insights? Thanks.
Edit: Just tried using Thunar again, and it no longer preserves perms either now...
Last edited by Pacopag (2012-08-20 23:25:38)
Offline
I assume your USB drive is using the FAT32 (DOS) filesystem. This filesystem does not store Linux file permissions.
The easy solution is to format the USB drive to the EXT filesystem. Since this will make it difficult to mount it using a computer with Microsoft Windows, the easy solution to that is to install Arch Linux on every computer you want to use. You'll thank me later.
Last edited by drcouzelis (2012-08-20 20:50:13)
Offline
I assume your USB drive is using the FAT32 (DOS) filesystem. This filesystem does not store Linux file permissions.
This.
If not, what are the original permissions, and what are the permissions of the copied file(s)?
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Yes it is fat32, so I guess that explains it. It also proves that I'm a liar (regarding the comment that thunar was preserving perms). I must've been ls -l 'ing the wrong thing.
I have no reason to use this drive in windows, so I'll just format it to an ext format and assume that I can mark this thread as solved.
drcouzelis: If only the rest of the world would just agree to use linux, I wouldn't be forced to maintain a windows machine in order to use some crappy proprietary crap. Good thing for virtualbox, it eases the pain at least a little.
Cheers,
Offline
I have no reason to use this drive in windows, so I'll just format it to an ext format and assume that I can mark this thread as solved.
Woah, really? I was just being silly, but if you won't ever need to use it on a Windows computer then a better Linux-friendly filesystem should definitely make your life easier. Even in a worst case scenario, you can just copy the data from it to your computer, format the drive back to FAT32, and copy the data back onto it, so it's not a big deal.
I tried installing EXT2 drivers on Windows once. I don't even remember if I ever got them working. Things (the driver and my abilities) might have improved since then though. ![]()
Offline
Well, I'm really just using this drive to back up my home directory, and I can't see myself ever needing to restore the files to a windows machine. For pics, vids and the like, there's always another fat32 usb stick laying around if I need it.
It's funny that it never even occurred to me to use a non-windows compatible format for a usb stick. Your silly comment made it click. Thanks.
Offline
ext2/3 can be read/write in windows, not TOO hard, got it working before. The other option is to use tar or similar (which do preserve permissions within the compressed file) if you can't change filesystem.
Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.
Offline
Ahh. Use tar. Great idea too.
Offline
Format it as EXT4, and in case you need to use it on Windows: http://www.ext2fsd.com
Oh, and don't worry about journalling reducing the lifespan of flash storage. 16 GB is dirt cheap and you'll probably lose it (or replace it with something bigger) by the time you can actually rewrite it 100.000 times. Personally, I don't see any reason to use EXT2.
To transfer all of the permissions, use "rsync -aAXv source destination":
https://wiki.archlinux.org/index.php/Fu … with_rsync
Last edited by DSpider (2012-08-22 15:55:09)
I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).
Offline