"Unknown" ownership of drive partition?

Asked by george_rutkay

Previously I had an issue where I could not use (write to) a partition on a hard drive because the "ownership" of the drive was not "root" or whatever the user account was - the ownership of the drive was listed as "unknown" and even logging in as root and applying GParted to change/format the partition did not resolve this.

What is the cause of this issue and how can it be solved?

Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
george_rutkay
Solved:
Last query:
Last reply:
Revision history for this message
Jim Hutchinson (jphutch) said :
#1

What is the file system? Use

sudo fdisk -l

to check.

Is the drive mounted?

Revision history for this message
george_rutkay (yaktur) said :
#2

I've tried formatting as ext3, as NTFS and as FAT32 - the same thing happens under all of these formats.

When I mounted the drive I could not write to it because permissions were set to read-only and ownership was set as "unknown" so I could not make any changes to the read-only permission.

I'm at work now so I'll try sudo fdisk -l when I get home.

Revision history for this message
Jim Hutchinson (jphutch) said :
#3

There is absolutely no reason why an ext3 drive should not be usable or "unknown" unless it isn't mounted. If this is not a drive that was set up at install, you will need to make changes to the /etc/fstab file in order for it to auto-mount. In 7.10, I've noticed that Linux drives will easily mount if you click on it the drive in the "computer" view under Places. You are usually asked for your password. Once mounted you shouldn't have any trouble reading and writing.

The only other thing I can think of is that the drive is being formatted in a way that is causing the problem. How are you formatting it?

Revision history for this message
george_rutkay (yaktur) said :
#4

I'm formatting it through GParted.

I tried formatting it through Windows (on that specific machine I can dual-boot to Windows XP) and it didn't change the symptoms.

I still haven't had a chance to try it - that computer has been in use all evening by the kids as well as my wife.

Revision history for this message
george_rutkay (yaktur) said :
#5

Ok, I've tried the fdisk command on the family computer, here is the result:

root@geo:/home/geo# sudo fdisk -l

Disk /dev/sda: 100.2 GB, 100256292864 bytes
255 heads, 63 sectors/track, 12188 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot Start End Blocks Id System
/dev/sda1 * 1 3187 25599546 7 HPFS/NTFS
/dev/sda2 3188 8286 40957717+ f W95 Ext'd (LBA)
/dev/sda3 8287 11933 29294527+ 83 Linux
/dev/sda4 11934 12188 2048287+ 82 Linux swap / Solaris
/dev/sda5 3188 4717 12289693+ b W95 FAT32
/dev/sda6 4718 5800 8699166 b W95 FAT32
/dev/sda7 5801 7043 9984366 b W95 FAT32
/dev/sda8 7044 8286 9984366 b W95 FAT32

HELP???? Why can't I use these partitions under Linux??

Revision history for this message
Jim Hutchinson (jphutch) said :
#6

Have you tried this?

https://help.ubuntu.com/community/MountingWindowsPartitions

That should allow you to set up any of those fat32 or ntfs partitions. I don't have ntfs partitions (or fat32) so I don't know the status of the ntfs-3g stuff, but I thought it was supposed to be automatically set up in 7.10 but I'm not sure.

You can try manually mounting the fat32 like this.

First set up a directory for it

sudo mkdir /media/sda6 (or whatever you want to call it)

Then mount it

sudo mount -t vfat /dev/sda6 /media/sda6

Depending on how things are set up you will either see it on the desktop, or in the place-computer window. Or you might have to manually navigate to /media/sda6 to find it.

Revision history for this message
george_rutkay (yaktur) said :
#7

When I try to follow the instructions on the link above, I see the contents of my /etc/fstab file:

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda3
UUID=3b7517c5-6721-465c-911f-6920bbfd820c / ext3 defaults,errors=remount-ro 0 1
# /dev/sda1
UUID=9EC44263C4423DB1 /media/sda1 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sda5
UUID=FC44BD6944BD2774 /media/sda5 ntfs defaults,nls=utf8,umask=007,gid=46 0 1
# /dev/sda4
UUID=8972527c-a6a9-41f6-9d1a-cca30f7b3dee none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0

The instructions state:

"and add the following line for each FAT32 partition:

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

      Two additional parameters are "shortname=mixed" and "user=user,group=group". The first will take care that all-caps short filenames show up in all-caps instead of in small characters. The second will take care that you are the owner of all files on the vfat partition, this will allow you to maintain file modification date/time when copying files to the FAT32 partition."

I don't see any FAT32 partitions in the list.

Yet when I open "Computer" window within Ubuntu, I can see the partitions. And when I boot into Windows I can click on "My Computer" and see the different partitions, even use them. They are formatted FAT32.

Revision history for this message
Jim Hutchinson (jphutch) said :
#8

"Computer" will show all devices even if they are not mounted. Double clicking them will mount them if Ubuntu recognizes them and can. The /etc/fstab file is used to make devices auto mount at log in.

The reason there are no fat32 in the fstab file is because they were not set up during install and added automatically. It looks like a couple NTFS partitions were set up though. Anything not added then will have to be added now manually.

Revision history for this message
george_rutkay (yaktur) said :
#9

I feel I'm in over my head on this problem. I'm going to give up on it.

Revision history for this message
Jim Hutchinson (jphutch) said :
#10

this isn't overly difficult. I must not be doing a very good job explaining it. Sorry. I'm also not 100% sure this is the solution to your problem but you can't read or write to a partition if it isn't mounted so we have to do that first.

There are two ways to mount a partition.

1. mount it manually from the command line. For your fat32 partition just create a mount point (which is just a directory) and then issue the mount command. The steps below will mount the sda6 partition to a directory called /media/sda6. After you do this you will also see it in your "computer" view as sda6 (or something with sda6 also in it). However, once you reboot the computer this partition will no longer be mounted. To have it mount every time you boot you have to add a line to the /etc/fstab file as well as make sure there is a mount point created (see option 2 below)

sudo mkdir /media/sda6
sudo mount -t vfat /dev/sda6 /media/sda6

2. edit the /etc/fstab file. Ubuntu moved to the UUID (not important now) method of identifying devices but we don't have to use that. You can, but it's another step I'm going to omit right now. I'm also using a different directory name here to illustrate. You can do whatever you want. In this case I make the assumption that the sda6 partition is storing music files.

sudo mkdir /media/music

Now edit the fstab file

gksudo gedit /etc/fstab

and then add the following line to have the sda6 partition mount on /media/music each time you boot.

/dev/sda6 /media/music vfat iocharset=utf8,umask=000 0 0

Save the file and close it. You can now mount it with

sudo mount -a

That command will mount all partitions listed in /etc/fstab but since the others were already mounted when you booted the computer just the new one will be mounted (or if you added more than one all the new ones).

Next time you reboot any partitions you added this way will also be mounted. Note, fat32 doesn't support permissions so you won't see anything about permissions if you examine the properties (or maybe it will say root or something - I don't know as I don't have fat partitions to check).

Revision history for this message
george_rutkay (yaktur) said :
#11

I've tried his and partitions still come up with ownership "unknown". It doesn't make any sense really. So I'm just going to abandon the idea temporarily, maybe in the near future just get another hard drive or something, back stuff up and reformat. Just not now, money is tight.

I don't think it's a bad hard drive and the computer is a good name brand. It just doesn't make sense why partitions come up with the fixed ownership "unknown" and prevents me from doing anything with any FAT21 partition, mounted or not. Yea, FAT32 doesn't support permission! Which is why it's odd to see this problem happen! I've never seen it occur before and I've been messing on computers since the late 80s!

Your advice is fine Jim, you haven't done anything wrong and I'm grateful for all of the assistance! It's the complexity of system I suspect that's the problem, one cannot be productive when there are issues like this keep tripping one up. Oh well!!!

Revision history for this message
Jim Hutchinson (jphutch) said :
#12

I think you are doing things correctly. You are just expecting something that isn't going to happen. Fat32 partitions are supposed to have unknown permissions because fat32 doesn't support permissions. It's simply the way they work. If you need to use permissions on these partitions then they will need to be formatted as ext3 or something similar. I have an external hard drive that has a fat32 partition. I mounted it and took a screen shot of the permissions. Is this what yours looks like?

http://ubuntukids.org/blog/wp-content/uploads/2007/12/wd_passport_properties.png

If so, then don't worry. It's normal. Despite the appearance, I can read and write to this partition without any problems.

Revision history for this message
george_rutkay (yaktur) said :
#13

Yes, my permissions are just as you have shown in the image link!

Thanks for your help on this, I will continue to try this!