LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-01-2005, 09:20 PM   #1
s34n
Member
 
Registered: Jun 2003
Distribution: Slackware 9.1 / Debian Sid
Posts: 57

Rep: Reputation: 15
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?
 
Old 02-05-2005, 07:44 PM   #2
s34n
Member
 
Registered: Jun 2003
Distribution: Slackware 9.1 / Debian Sid
Posts: 57

Original Poster
Rep: Reputation: 15
Anybody?
 
Old 02-05-2005, 08:13 PM   #3
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,336

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"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
 
Old 02-06-2005, 12:20 PM   #4
s34n
Member
 
Registered: Jun 2003
Distribution: Slackware 9.1 / Debian Sid
Posts: 57

Original Poster
Rep: Reputation: 15
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.

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Submount, "permission denied" when writing to floppy as normal user DaneM Linux - Software 5 02-22-2006 02:05 PM
Does FreeBSD 5.3 have any issues with reading/writing to EXT2/3 partitions? Tsuroerusu *BSD 2 10-14-2005 06:55 PM
permission denied writing to /tmp rsteelman Linux - General 7 02-06-2005 07:10 PM
permission denied! floppy cd-rom dvd-rom HELP! OMEGA-DOOM Linux - Software 17 10-15-2004 05:40 PM
Floppy permission denied eagle8762 Linux - Distributions 2 07-18-2003 10:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:45 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration