On Thu, 9 Mar 2006, Martin Gregorie <see@xxxxxxxxxxxxxx> wrote:-
>David Bolt wrote:
<Snip>
>>For some reason,
>> the files take on a root.users ownership and stay that way until it is
>> unmounted. Once it's unmounted, I can remount it as a normal user and
>> the files take on my $UID.users ownership.
>>
>Isn't that common VFAT behavior? I certainly haven't reformatted my
>drive so its still VFAT. My backup script runs as root, but that hasn't
>stopped me looking at stuff as a normal user. This is what I'd expect
>since VFAT doesn't understand file ownership. The disk content must
>inherit its ownership from the user who mounted it.
The problem was that even when the drive was in use by a user, and the
files were "owned" by that user, once the FTP daemon tried writing to
the drive, the ownerships were swapped to root and a normal user
couldn't write to the drive until it was un-mounted and mounted by the
user. Reading from it wasn't affected, just writing.
It doesn't matter that much now since I prefer to use rsync instead.
While rsync isn't quite as fast as FTP, it doesn't cause this change of
ownership. It means a little more typing and a lot less drag-and-drop,
but it does get the job done, and that was all that was important.
>> Maybe, although that doesn't explain the 20GB drive being given the
>> mount-point usbdisk. I wonder if the "WD_USB_2" is a part of the
>> identifier string.
>>
>Could it be the VFAT volume (partition) label? In this case it could
>have been written as "WD" for the manufacturer and USB_2 because its a
>USB 2.0 device. Using the volume label would make a lot of sense
>because the disk would always be mounted in the same place regardless
>of which USB connector it was plugged into.
Probably. And, just in case multiple identically, or unnamed, devices
would have some suffix added to the name given to mount point to resolve
name conflicts.
>I've not yet tried to connect the drive to a Winders box so I can't
>tell whether my volume label guess is right. Does your no-name drive
>have a volume label set? If not, maybe "usbdisk" is the default.
I used fdisk and mkdosfs to write the VFAT file system since I use it
for moving photos between one of my Linux systems and a friends Windows
system. I didn't give it a name when I wiped the old file system as I
didn't think that it would be used.
However, purely as a "scientific" test, and since it's presently empty,
I can test that out. One quick mkdosfs followed by a reconnect shows
that it is indeed the volume name that is used as the name of the mount
point.
Thinking about it, it should have been obvious since inserting a DVD
results in the automatic creation of a mount point under media that is
the same as the volume name of the disc. In the case of DVDs, the mount
point is a symlink to /media/dvd.
Regards,
David Bolt
--
Member of Team Acorn checking nodes at 50 Mnodes/s: http://www.distributed.net/
AMD1800 1Gb WinXP/SUSE 9.3 | AMD2400 256Mb SuSE 9.0 | A3010 4Mb RISCOS 3.11
AMD2400(32) 768Mb SUSE 10.0 | RPC600 129Mb RISCOS 3.6 | Falcon 14Mb TOS 4.02
AMD2600(64) 512Mb SUSE 10.0 | A4000 4Mb RISCOS 3.11 | STE 4Mb TOS 1.62
|
|