LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Permission denied writing to ext2 floppy (https://www.linuxquestions.org/questions/linux-general-1/permission-denied-writing-to-ext2-floppy-285149/)

s34n 02-01-2005 09:20 PM

Permission denied writing to ext2 floppy
 
Here is my problem:
I have a floppy disk formatted with ext2 filesystem, I am able to mount it as a normal user, however, I can not write to it.
As root, I can write to it , so I know it's not a problem with the floppy.
Here is an example:
Code:

s34n@the-gates-of-hell:/media/floppy$ echo goddamnit > testfile
bash: testfile: Permission denied

Here is my fstab :

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
/dev/hda8 / xfs noatime 0 1
/dev/hda6 /boot ext3 defaults 0 2
/dev/hda10 /home xfs noatime 0 2
/dev/hda7 none swap sw 0 0
# Now the user mountable file systems...
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hdc /media/dvdrw iso9660 ro,user,noauto 0 0
/dev/hdd /media/cdrom iso9660 ro,user,noauto 0 0
/dev/fd0 /media/floppy auto rw,user,noauto,sync 0 0
/dev/sda1 /media/usb0 auto rw,user,noauto 0 0
/dev/sdb1 /media/usb1 auto rw,user,noauto 0 0
/dev/hda1 /mnt/hda1 ntfs noauto,users,exec,ro,umask=000,uid=s34n,gid=s34n 0 0
/dev/hda5 /mnt/hda5 vfat noauto,users,exec,umask=000,uid=s34n,gid=s34n 0 0
/dev/hda9 /mnt/data xfs rw,noatime,user,noauto 0 2
# End

These are the permissions of /dev/fd0 and /media/floppy BEFORE I issue the command :
Code:

s34n@the-gates-of-hell:~$ mount /media/floppy
brw-rw---- 1 root floppy 2, 0 Jul 22 2004 /dev/fd0
drwxrwxr-x 2 root floppy 6 Jan 29 20:47 floppy

And these are the permissions AFTER :

brw-rw---- 1 root floppy 2, 0 Jul 22 2004 /dev/fd0
drwxr-xr-x 3 root root 1024 Feb 1 21:08 floppy

And this is the output from mount :
Code:

s34n@the-gates-of-hell:~$ mount
/dev/hda8 on / type xfs (rw,noatime)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda6 on /boot type ext3 (rw)
/dev/hda10 on /home type xfs (rw,noatime)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/fd0 on /media/floppy type ext2 (rw,noexec,nosuid,nodev,sync,user=s34n)


I realize the reason I cannot write to /media/floppy is because after mounting, the permissions of /media/floppy are changed to be writable only by root.
But what I don't understand is why the permissions do change after mounting.

Anyone have a clue?

s34n 02-05-2005 07:44 PM

Anybody?

jailbait 02-05-2005 08:13 PM

"I have a floppy disk formatted with ext2 filesystem, I am able to mount it as a normal user, however, I can not write to it."

Is the write protect tab open?

--------------------------
Steve Stites

s34n 02-06-2005 12:20 PM

I have found a solution, although I'm not sure why it works.
When I created the ext2 filesystem on the floppy, I did it from a root console with mkfs.ext2.

However, I formatted it once again from KDE with kfloppy as normal user. Now I can mount it and write to as normal user.:confused:

I went back and formatted it again as root to make sure this was it, and got the same results.

Well now I'm happy its working, but if someone could shed some light on why this is. It would be nice to know.


All times are GMT -5. The time now is 12:50 PM.