After a systemcrash and a re-install I only can read my XP partition. I forgot what I have to insert in the fstab. My xp partition is mounted as:

/dev/hda1 /media/windows vfat rw,iocharset=utf8,umask=000 0 0

and I can't change ownership of the xp directory.
Is there anyone who can help me out???

Dani AI

Generated

reported that after a reinstall his Windows partition mounted as VFAT was readable but not writable and he could not change ownership. He later said the problem was solved without details; the notes below explain the usual causes and fixes so others hitting the same symptom can diagnose and repair it.

FAT/VFAT does not support Unix ownership or per-file mode bits. Ownership and permissions are set when you mount the filesystem, so chown/chmod on files inside a VFAT volume will not have the expected effect. To make files appear owned by a particular Linux user, mount with uid= and gid= and set permissions with fmask=/dmask= (or umask=). Example fstab-style entry (replace device, uid/gid, and mount point appropriately):

/dev/sdX1  /mnt/windows  vfat  defaults,uid=1000,gid=1000,fmask=0133,dmask=0022,utf8 0 0

If the partition is truly read-only, first check whether the kernel forced it read-only because of filesystem errors. Useful checks and quick fixes:

mount | grep /mnt/windows
dmesg | tail -n50
sudo dosfsck -a /dev/sdX1
sudo mount -o remount,rw /mnt/windows

Also confirm the filesystem type with blkid — if it is NTFS use ntfs-3g instead of a VFAT driver. To change ownership of the empty mountpoint directory itself (not the mounted content), unmount the partition, chown the directory, then remount. For detailed option descriptions see the mount manual and the FAT wiki: mount(8) man page, FAT — ArchWiki.

Forget it. The problem is solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.