I have a fedora chroot running on an Android device and want to be able to plug a USB pen drive into the Android device and have it accessible to a user in the fedora chroot.
The pen drive is mounted to /mnt/usbhost2 within Android. I have created a folder within /media of the fedora chroot as a mount point this folder (/usb) is owned by the user that needs access to the usb device.
I have then tried the following command the mount the USB device to this folder:
$bbox mount -o bind /mnt/usbhost2 $mnt/media/usb
Which does work however the usb folder is no longer accessable by the user (only root user has access). Before the mount the usb folder ls -l out put:
drwxrwxr-x username username 4096
However after the mount the ls -l out put it:
d---rwxr-x username media_rw 8192
So the question is how to I get the owner to have access again, simply using chmod does not work. I guess it has something to do with that fact that the usb device is formatted FAT32.
Is there another way I could mount this drive in the chroot that would give the user access?
d---rwxr-x
(075) should mean that everybody in themedia_rw
group (except for your special user) has full access (7), and that everybody else (i.e., not the user or in the group) has read-only access (5). Have you tried accessing the drive as some other user? Other things to try: (1)chown
the mount point to a user other than username. (2) Check the documentation formount
on your system. If it supports any ofnoowners
,-u
, or-uid
, use it. – Feb 11 '13 at 21:33