'chown' on /windows/D

Hi, I’m trying to change the owner of my /windows/D directory so I can move files over to my windows partition as a user (and not just root). However, I’m having some trouble:


kwikness@linux-ekqv:/windows/D> su
Password:
linux-ekqv:/windows/D # chown -R kwikness "_My Music"
linux-ekqv:/windows/D # ls -l
total 996
drwxr-xr-x 1 root users  49152 2009-02-05 21:54 _Docs
drwxr-xr-x 1 root users   4096 2009-02-19 20:34 Downloads
drwxr-xr-x 1 root users   8192 2009-01-04 15:36 _Homework
drwxr-xr-x 1 root users   4096 2009-01-17 10:40 _ICS Stuff
drwxr-xr-x 1 root users   4096 2009-02-05 21:55 Incomplete
drwxr-xr-x 1 root users      0 2008-12-19 19:27 msdownld.tmp
drwxr-xr-x 1 root users 847872 2009-02-11 15:56 _My Music
drwxr-xr-x 1 root users   4096 2009-01-31 09:24 My Music
drwxr-xr-x 1 root users  73728 2008-12-14 14:01 _My Pictures
drwxr-xr-x 1 root users   4096 2009-02-18 14:41 Program Files
drwxr-xr-x 1 root users      0 2009-01-23 11:03 $RECYCLE.BIN
drwxr-xr-x 1 root users   4096 2008-12-14 16:13 RECYCLER
drwxr-xr-x 1 root users   8192 2009-02-13 11:30 Rohan
drwxr-xr-x 1 root users      0 2009-02-06 10:38 _Solutions
drwxr-xr-x 1 root users   4096 2008-12-19 21:00 Star.Wars.Battlefront.II-RELOADED
drwxr-xr-x 1 root users   4096 2008-12-14 15:39 System Volume Information
drwxr-xr-x 1 root users      0 2008-11-10 16:02 Unreal
drwxr-xr-x 1 root users      0 2008-10-15 16:08 VS2005Pro
linux-ekqv:/windows/D #

It looks like the command completes successfully, but the owner does not change. Am I doing something wrong?

kwikness wrote:
> Hi, I’m trying to change the owner of my /windows/D directory so I can
> move files over to my windows partition as a user (and not just root).
> However, I’m having some trouble:
…]
> It looks like the command completes successfully, but the owner does
> not change. Am I doing something wrong?

FAT has no such thing as file permissions

You need to edit
/etc/fstab

see this guide
openSUSE: HowTo set disk access permissions for Fat32 (VFAT) on a desktop PC

the line will be like this eg:

/dev/sda?* /windows/D vfat users,gid=users,umask=0002,utf8=true 0 0

reboot required

Hi,

caf4926 wrote:
> You need to edit
> /etc/fstab
>
> see this guide
> ‘openSUSE: HowTo set disk access permissions for Fat32 (VFAT) on a
> desktop PC’ (http://www.swerdna.net.au/linhowtofat32.html)
>
>
> the line will be like this eg:
>
> /dev/sda?* /windows/D vfat users,gid=users,umask=0002,utf8=true 0 0
>
> reboot required

Incorrect. Just remount it.

That’s if it is a vfat/fat32 partition. It might also be NTFS – I can’t spot where the filesystem is mentioned by kwikness.

In any event, as caf4926 and LittleRedRooster intimated, the windowsy partitions don’t have permissions in the Unix style. So the Linux mount commands make pseudo-permissions, temporary permissions, that bind the users to adhere to the patterns specified in the mount commands for the time the filesystem is mounted. Then when it’s mounted somewhere else, like in windows, it reverts to it’s original (world writeable) permissions.

In these special cases chown and chmod don’t work (IIRC).

I had a further think.
FAT32 directories usually appear like this (if the user doesn’t intervene):
drwxrwxr-x 1 root users 49152 2009-02-05 21:54 _Docs
and NTFS like this:
drwxr-xr-x 1 root users 49152 2009-02-05 21:54 _Docs
and the second one looks like a match.

So kwikness, if NTFS, perhaps check this one for some background info:
HowTo Mount NTFS Filesystem Partition Read Write Access in openSUSE 10, 11