ejecting ipod as user
Here I mount my ipod and unmount it then try to eject it as user and root.
staph% mount /mnt/ipod
staph% ls /mnt/ipod/
Calendars/ Contacts/ Files/ iPod_Control/
staph% umount /mnt/ipod
staph% eject -v ipod
eject: device name is `ipod'
eject: expanded name is `/dev/ipod'
eject: `/dev/ipod' is a link to `/dev/sdb2'
eject: `/dev/sdb2' is not mounted
eject: `/dev/sdb2' is not a mount point
eject: `/dev/sdb2' is a multipartition device
eject: trying to eject `/dev/sdb2' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/sdb2' using SCSI commands
eject: SCSI eject failed
eject: trying to eject `/dev/sdb2' using floppy eject command
eject: floppy eject command failed
eject: trying to eject `/dev/sdb2' using tape offline command
eject: tape offline command failed
eject: unable to eject, last error: Invalid argument
staph% ssh root@localhost
Last login: Mon Jul 19 15:34:46 2004 from localhost.localdomain
[root@staph root]# eject -v ipod
eject: device name is `ipod'
eject: expanded name is `/dev/ipod'
eject: `/dev/ipod' is a link to `/dev/sdb2'
eject: `/dev/sdb2' is not mounted
eject: `/dev/sdb2' is not a mount point
eject: `/dev/sdb2' is a multipartition device
eject: trying to eject `/dev/sdb2' using CD-ROM eject command
eject: CD-ROM eject command failed
eject: trying to eject `/dev/sdb2' using SCSI commands
eject: SCSI eject succeeded
at this point the ipod displays "ok to disconnect"
The sbp2 module is still hanging around, but i
dont mind that.
Now heres what happens when i tell eject specifically
to use the SCSI command (the one that worked as root
above):
staph% mount /mnt/ipod
Calendars/ Contacts/ Files/ iPod_Control/
staph% umount /mnt/ipod
staph% eject -vs ipod
eject: device name is `ipod'
eject: expanded name is `/dev/ipod'
eject: `/dev/ipod' is a link to `/dev/sdb2'
eject: `/dev/sdb2' is not mounted
eject: `/dev/sdb2' is not a mount point
eject: `/dev/sdb2' is a multipartition device
eject: trying to eject `/dev/sdb2' using SCSI commands
eject: SCSI eject failed
eject: unable to eject, last error: Permission denied
Here are the relevent portions of some other files:
/etc/updfstab.conf:
device ipod {
symlink true
partition 2
match hd Apple
}
/etc/security/console.perms
#device classes
<ipod>=/mnt/ipod*
#permission definitions
<console> 0600 <ipod> 0660 root.disk
The system is RedHat 8
So in summary, when the iPod gets plugged in a symlink is
created from /dev/ipod to the second partition, /mnt/ipod
is created and an entry in fstab is made. I can mount and
unmount as a user no problem. However I get Permission
Denied when I try (as user) to eject a device that I OWN
and is NOT mounted.
I'm stumped... any ideas?
|