[CentOS] Setting Group owner of files on USB drive

Sat May 31 14:23:22 UTC 2008
Kenneth Burgener <kenneth at mail1.ttak.org>

On 5/31/2008 3:33 AM, Johnny Hughes wrote:
> Robert Moskowitz wrote:
> You can't expect it to maintain ext3 file permissions in a FAT32 
> partition :D

Not necessarily.  If the Linux files do not need to be accessed from the 
windows environment, you could create an image file, format the image as 
ext3, mount the image file as a loop device, and treat it as a standard 
ext3 mount point.

# create a 10M empty file
dd if=/dev/zero of=disk.img bs=1024 count=10000

# format with ext3
mkfs.ext3 disk.img

# mount image
mkdir /mnt/mydata
mount -o loop disk.img /mnt/mydata

# read / write files
echo "hello world" > /mnt/mydata/hello.txt
ll /mnt/mydata