Yes, you shouldn't just pull the drive. In most cases, it wont pose a problem, but I would at least type 'sync' and wait for the prompt to return before removeing the drive. When you tell an operating system to write data to a disk, they don't always do it right away, but instead pretend that they've done it, and then finish at their leasure. Linux is no exception to this. Most of the time it will finish right away, but telling it to "sync" will cause it to finish any and all pending write operations to disk.
I would be willing to bet that your drive is formated with FAT32. FAT32 is a MS Windows format that linux can safely read and write to. The catch is that it does not store Unix style permisions. Everything on the whole disk is treated as having the same permissions. Since directories must be executable, so also the files are.
The best solution I can think of would be to alter (or add) the line from your /etc/fstab. If you add 'sync' to the options list, then data to that drive will remain syncronized. If you add 'noexec', then it will prevent execution of files from the drive. You can get more options and help from the -o section of:
man mount
I don't know for sure that the hotplug / auto mount systems will honor the /etc/fstab (though I believe they do), so you will want to verify that the options show up in:
cat /proc/mounts
after you have inserted and mounted the drive.
|