Other The strange machine !

Dear guys,

I'd like to thank all of you that have actively partecipated to my threads in this forums, with great professionality and solid knowledgments, spending your time to reply to my questions.

At these faceless and (sometimes) nameless people, I'd like to pose the following question.

BACKGROUND.
Thanks to the power of the FreeBSD, I've correctly configured and set the kernel, realizing the "perfect" block of any device (USB, IDE, and SATA) attached in real time to a workstation (hot-plugged devices, if you like). Please, read "perfect" as: rwx block of the attached devices for all users (root also) at kernel level.

THE STRANGE MACHINE.
I've a Ubuntu-like machine that shows this strange behaviour.

The machine logins as a non-root user (let's call it for convenience: jerry@bonnie). Once a usb stick (/dev/sdc) is plugged in, its filesystem is not mounted, so jerry (and all the other members of bonnie group) receives an "access denied" message if he try to copy a file in /dev/sdc1 (of corse).

However, sdc1 magically appears in the /media directory (/media/sdc1) with rw permission for root and root members group:

jerry@bonnie:/ # ls - l /media
drw-rw---- root root ........ sdc1

Under this magically situation, giving to jerry the root's permissions (with the sudo command), jerry can copy a file in the /media/sdc1.

Now, if /dev/sdc1 is read-only mounted on /media/sdc1 all the files of the usb stick are shown, but no the copied file (it seems disappear), and it reappears when the usb is unmounted.

Again:
- if you plug the usb stick on a Windows PC, the file is not shown.
- if you re-plug the stick on the original Ubuntu-like machine, the file re-appears in /media/sdc1 directory.

QUESTION.
Where has been copied the file ? Maybe in the slack space ? or ...... ?

I'm ready to understand more with you.


See you.
 
Now, if /dev/sdc1 is read-only mounted on /media/sdc1 all the files of the usb stick are shown, but no the copied file (it seems disappear), and it reappears when the usb is unmounted.
Where has been copied the file ? Maybe in the slack space ? or ...... ?
It's on the host's disk, stored in the directory of the mountpoint. The mountpoint is "overlapped" with the stick's content when it's mounted, hiding the original file. It "magically" reappears when the stick is unmounted.
 
Hello SirDice ,

so, if I've well understood, you are saying that the file is not really copied on the usb stick but only on the mountpoint directory of the host's disk ?

But the host's disk is a Ubuntu-like bootable usb stick, that is read-only mounted on /cdrom directory (by design).

Please, let me verify ....

OK ... it's right !!!

Thanks very much !!!
 
Back
Top