Write to floppy?

Matt Richards matt at faceparty.net
Wed Aug 8 22:05:42 UTC 2007


larry shields wrote:
> cj wrote:
>   
>> norman wrote:
>>   
>>     
>>>>>> When I put a floppy in it opens as read only. I've tried accessing as 
>>>>>> root and trying to mount it with -w as root. It just won't let me. 
>>>>>> Anyone know why?
>>>>>>     
>>>>>>         
>>>>>>           
>>>>>>             
>>>>> Are you sure that the little tab on the floppy has not been set to read
>>>>> only? If it has, slide it up or down which ever the case may be.
>>>>>
>>>>> Norman
>>>>>
>>>>>
>>>>>   
>>>>>       
>>>>>         
>>>>>           
>>>> norman, if he has the tab set to allow reading and writing, you still 
>>>> have ubuntu to deal with as it, for some reason, allows only the root 
>>>> user to write to teh floppy
>>>>     
>>>>       
>>>>         
>>> I must admit it is a long time since I used a floppy but, if you want, I
>>> will try to find one and see what happens. However, I am convinced that
>>> floppies are easily mounted and used.
>>>
>>> Norman
>>>
>>>
>>>   
>>>     
>>>       
>> right..you just have to access them with root permissions to write to 
>> them. otherwise you can only read
>> --cj
>>
>>   
>>     
> Try mounting the floppy, like this...
> Mount /media/floppy0, then cd /media/floppy0, you then should see the 
> prompt say norman at whatever:/media/floppy0 your floppy drives LED should 
> light up...
>
> The do an 'ls' to list the files, now too write to the floppy you have 
> to be root...
>
> Hope this helps you...
>
> Larry
>
>
>   
I don't totally agree with this, I don't have a floppy disk but I do
have usb device with a fat32 filesystem on it, which is basically the
same ...


matt at mattspc /mnt $ s mount -t vfat /dev/sdc1 /mnt/usb
matt at mattspc /mnt $ touch usb/file
touch: cannot touch `usb/file': Permission denied
matt at mattspc /mnt $ s umount /mnt/usb
matt at mattspc /mnt $ s mount -t vfat /dev/sdc1 /mnt/usb -o umask=0000
matt at mattspc /mnt $ touch usb/file
matt at mattspc /mnt $ ls -lha usb/file
-rwxrwxrwx 1 root root 0 Aug 8 23:00 usb/file
matt at mattspc /mnt $ umount usb

as you can see with the umask=0000 the permissions are set to everybody rwx

also ...


matt at mattspc /mnt $ cat /etc/fstab | grep usb
/dev/sdc1 /mnt/usb auto noauto,rw,users 0 0
matt at mattspc /mnt $ mount /mnt/usb
matt at mattspc /mnt $ touch usb/file2
matt at mattspc /mnt $ ls -lha usb/file2
-rwxr-xr-x 1 matt users 0 Aug 8 23:01 usb/file2
matt at mattspc /mnt $

.. if you have the correct line in /etc/fstab with the 'users' option
then users have the ability to mount that device to the mount point and
the permissions allow that user rwx access to the content of the device

('s' in the first example is just an alias to sudo)

I'm basically saying that i'm very sure its possible to mount vfat file
systems in a way that will allow users to access them without root
access, floppy disks have been around for years, how do you think
networks that ran unix and linux clients for users allowed users to use
removable media in the past, having to have root access is just stupid
and would of very quickly been overcome.

Matt.





More information about the ubuntu-users mailing list