PDA

View Full Version : Cannot change owner



fedora1968
31st January 2007, 05:12 PM
My computer has two HDDs. The first one is used for Windows. And the second one for Fedora. In order to swap data between windows and fedora, I created a partition /data (vfat, 50GB) on the second HDD when I installed fedora. Now I can access /data from Windows (it is disk K:, in my case). When running fedora, I can read the file in /data but I cannot write to it. Its permission is drwxr-xr-x and the owner is root. I tried to change it permission to rwxrwxrwx but failed. Then I try to change its owner but still failed.

Does any one know how to solve this problem? Thanks a lot.

My system is :

CPU AMD 64 x2 3800+
RAM 2GB
1st HDD 250GB
2nd HDD 160GB

mnisay
31st January 2007, 05:32 PM
try to search the forum with the keyword

NTFS

the result will lead you to a starting point.

its not advisable to have your window$ drive WRITEABLE!
but it is possible.

goodluck!

fedora1968
31st January 2007, 09:28 PM
Thanks for the reponse and the information, mnisay.

I read some posts about sharing disk between linux(fedora) and windows. One method is mount the windows disk to a directory of linux(fedora).

I think I did not express myself clearly. I have two HDD, say hda and hdb. hda is used for windows completely. I install fedora on hdb and I ceated a 50GB vfat partition on hdb. This partition is "dev/hdb2". It is the directory "/data" in fedora and windows treates it disk K. Fedora cannot access hda, which is totally for windows. And this is what I planned.

My problem is, I cannot write to "/data" unless I login as root. I created this partition during fedora installation. I want change its owner. But I was told permission denied. In my opintion, the root can do anything. But I cannot understand why I cannot change the owner of "/data".

Thanks

nick.stumpos
31st January 2007, 09:39 PM
check your fstab and make sure its being mounted with read write perms.

mnisay
1st February 2007, 04:58 PM
try to post your results from

#cat /etc/fstab
#fdisk -l
#uname -a
#rpm -qa | grep ntfs

i have a feeling it was mounted as read-only.

fedora1968
1st February 2007, 06:08 PM
Thanks Nickisgod1 and mnisy. The computer is in my home. I will try what you suggest this evening.

markkuk
1st February 2007, 07:27 PM
I install fedora on hdb and I ceated a 50GB vfat partition on hdb. This partition is "dev/hdb2". It is the directory "/data" in fedora and windows treates it disk K.

My problem is, I cannot write to "/data" unless I login as root. I created this partition during fedora installation. I want change its owner. But I was told permission denied. In my opintion, the root can do anything.
Even root can't do what's physically impossible. There isn't any file ownership information on VFAT filesystems, so you can't change the non-existent data.

fedora1968
3rd February 2007, 10:22 PM
mnisay,
The following is the information you need to solve my problem:

#cat /etc/fstab

/dev/VolGroup00/LogVol00 / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
/dev/hdb2 /data vfat defaults 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
tmpfs /dev/shm tmpfs defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
/dev/VolGroup00/LogVol01 swap swap defaults 0 0

# fdisk -l

Disk /dev/hda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 530 30400 239938807+ 7 HPFS/NTFS
/dev/hda2 1 529 4249161 b W95 FAT32

Partition table entries are not in disk order

Disk /dev/hdb: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 13 104391 83 Linux
/dev/hdb2 14 13067 104856255 b W95 FAT32
/dev/hdb3 13068 19457 51327675 8e Linux LVM

#uname -a

Linux localhost.localdomain 2.6.18-1.2798.fc6xen #1 SMP Mon Oct 16 14:59:01 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux


#rpm -aq | grep ntfs

mnisay
4th February 2007, 08:58 AM
i cant try the latest vfat modules for fc6 right now. but it should work i believe.

Is it possible for you to convert /data to NTFS filesystem under your Windows?

If so, the below are tested under my systems and is currently working right now.
after NTFS convertion, just shutdown your windows properly, then go to FC6, issue

#yum install ntfs-3g

reboot. mount your shared drive as

#mount /dev/hda2 /data

walahito! no need to change ownership, you can now read/write to your /data.
this may somehow upgrade your kernel though.

make it permanent with /etc/fstab, edit the lines with vfat and change them to ntfs like so

/dev/hdb2 /data ntfs defaults 0 0

happy linux ntfs!