Thursday, April 2, 2009

Linux windows media issues

When you install a media formatted on a Windows computer (usually Fat32 or NTFS) and then bring it to an Ubuntu machine, by default all the media is set to the root ownership. Hence changing the ownership is not possible unless you are root. But there is still a surprise for you: If you do morph yourself as the "root" user, such media will still prevent you from changing the ownership. Try this:

1. sudo bash


At this point you will become the root user. Now let us try to change the ownership of a folder in a media called "G-Drive" which was previously formatted by Windows.

2. chown xyzabc:xyzabc /media/G-Drive/myFolder
Now this will seem to work. But hang on a sec...

3. ls -l /media/G-Drive
you will now find that all the folders in G-Drive are still belonging to root:root

Bleah! So what do you do? Install "Disk Manager" (A Gnome project) using Ubuntu's Add/Remove Applications feature. Start that up and under "Advanced Configuration" place a tickmark next to the Windows media, and then edit its parameters as follows. The locale=en_IN is possibly because I am in India. You would have to modify that as per your locale. Or maybe omit it entirely.

defaults,utf8,umask=0000,uid=1000,nosuid,nodev,
uhelper=hal,locale=en_IN,gid=1000

(All of above should be in one line. I gave it separately in two lines for convenience)

Now in the Disk Manager under "General" tab you can even tick "Detect new devices on startup" and also "Enable write support"

No comments:

Post a Comment