PDA

View Full Version : chown command



AllanPen
19th July 2012, 10:43 PM
I realize this should be simple; haven't been LInuxing for a while. I can't get access to a mounted vfat partition. I give the command sudo chown -R allan /media/vfat
and get back this:

[allan@MyFedora ~]$ sudo chown -R allan /media/vfat
chown: changing ownership of `/media/vfat/$RECYCLE.BIN/desktop.ini': Operation not permitted
chown: changing ownership of `/media/vfat/$RECYCLE.BIN': Operation not permitted
chown: changing ownership of `/media/vfat/ATIH2012_5545_en-US.exe': Operation not permitted
chown: changing ownership of `/media/vfat/mbam-consumer.exe': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/PC/PC_MBR/Mint.mbw': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/PC/PC_MBR/FedoraMBR.mbw': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/PC/PC_MBR': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/PC/PC_BIOS/OC_BIOS': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/PC/PC_BIOS': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/PC': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/LP.html': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/MyDexpot.dxp': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/PW.txt': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/Laptop/Lap_Win7.mbw': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/Laptop/Lap_Mint.mbw': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg/Laptop': Operation not permitted
chown: changing ownership of `/media/vfat/Backup/USB_Emerg': Operation not permitted
chown: changing ownership of `/media/vfat/Backup': Operation not permitted
chown: changing ownership of `/media/vfat': Operation not permitted

sidebrnz
19th July 2012, 11:01 PM
You can't chown files on a vfat partition even as root because vfat doesn't have any way to record the ownership.

AllanPen
20th July 2012, 02:20 AM
You can't chown files on a vfat partition even as root because vfat doesn't have any way to record the ownership.

Ahhh I see; thanks.

Gareth Jones
20th July 2012, 01:18 PM
You can fake the ownership and permissions of (all) files a vFAT (or other non-Unix) file-system with mount options, but if the device was auto-mounted in GNOME or KDE then that should have been done automatically.

If it's a manual mount, or in /etc/fstab, check the section "Mount options for fat" in "man mount", specifically uid, gid, umask, dmask and fmask. You probably want something like "uid=1000,gid=1000".

AllanPen
20th July 2012, 02:04 PM
You can fake the ownership and permissions of (all) files a vFAT (or other non-Unix) file-system with mount options, but if the device was auto-mounted in GNOME or KDE then that should have been done automatically.

If it's a manual mount, or in /etc/fstab, check the section "Mount options for fat" in "man mount", specifically uid, gid, umask, dmask and fmask. You probably want something like "uid=1000,gid=1000".

I mounted it during installation and partition selection.