Launchpad has imported 9 comments from the remote bug at
https://bugs.freedesktop.org/show_bug.cgi?id=63849.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2013-04-23T17:07:14+00:00 Wbauer wrote:

Created attachment 78381
output of 'udisksctl dump'

When I try to mount a floppy disk (formatted with FAT12) in the internal
floppy drive using "udisksctl mount -b /dev/fd0" it gets mounted as root
instead of the logged in user. As a consequence I don't have write
access.

wolfi@amiga:~> udisksctl mount -b /dev/fd0
Mounted /dev/fd0 at /run/media/wolfi/disk.
wolfi@amiga:~> ls -la /run/media/wolfi/disk
insgesamt 86
drwxr-xr-x  2 root root  3584  1. Jän 1970  .
drwxr-x---+ 3 root root    60 23. Apr 18:07 ..
-rwxr-xr-x  1 root root 83968 16. Okt 2001  slides1.ppt


On the other hand, when I try to mount an USB stick (formatted with FAT32) it 
does get mounted as the logged in user.

wolfi@amiga:~> udisksctl mount -b /dev/sdc1
Mounted /dev/sdc1 at /run/media/wolfi/Transcend.
wolfi@amiga:~> ls -la /run/media/wolfi/Transcend
insgesamt 16
drwx------   3 wolfi users 8192  1. Jän 1970  .
drwxr-x---+  4 root  root    80 23. Apr 18:08 ..
drwx------  18 wolfi users 8192 27. Jän 23:45 Instrumentelle Analytische Chemie 
Protokolle

I would expect that the floppy disk is also mounted as the logged in
user.

The same behaviour occurs with udisks-2.0.0 as shipped with openSUSE 12.3 and a 
self-compiled udisk-2.1.0.
I also tried an Ubuntu 13.04 LiveCD with the same result, so it's not openSUSE 
specific.

wolfi@amiga:~> cat /etc/fstab
/dev/sdb2            swap                 swap       defaults              0 0
/dev/sda1            /                    reiserfs   acl,user_xattr        1 1
proc                 /proc                proc       defaults              0 0
sysfs                /sys                 sysfs      noauto                0 0
debugfs              /sys/kernel/debug    debugfs    noauto                0 0
usbfs                /proc/bus/usb        usbfs   
auto,busgid=110,busmode=0775,devgid=110,devmode=0664                0 0
devpts               /dev/pts             devpts     mode=0620,gid=5       0 0
/dev/sdb1            /windows/C           ntfs-3g    defaults              0 0

wolfi@amiga:~> rpm -q udisks2 gvfs libatasmart4
udisks2-2.0.0-5.4.1.x86_64
gvfs-1.14.2-2.1.2.x86_64
libatasmart4-0.19-2.1.1.x86_64

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/2

------------------------------------------------------------------------
On 2013-04-23T17:09:29+00:00 Wbauer wrote:

Created attachment 78382
output of 'udevadm info --export-db' (as root)

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/3

------------------------------------------------------------------------
On 2013-04-23T17:10:44+00:00 Wbauer wrote:

Created attachment 78383
output of 'cat /proc/self/mountinfo'

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/4

------------------------------------------------------------------------
On 2013-04-24T18:11:05+00:00 Wbauer wrote:

I just noticed that the floppy _is_ mounted as user when I specify the
filesystem type with the -t option:

wolfi@amiga:~> udisksctl mount -b /dev/fd0 -t vfat
Mounted /dev/fd0 at /run/media/wolfi/disk.
wolfi@amiga:~> ls -la /run/media/wolfi/disk
insgesamt 86
drwx------  2 wolfi users  3584  1. Jän 1970  .
drwxr-x---+ 3 root  root     60 24. Apr 20:05 ..
-rw-r--r--  1 wolfi users 83968 16. Okt 2001  slides1.ppt

So the issue seems to be that udisks doesn't correctly identify the
filesystem type.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/5

------------------------------------------------------------------------
On 2013-04-24T20:17:05+00:00 Zeuthen wrote:

(In reply to comment #3)
> I just noticed that the floppy _is_ mounted as user when I specify the
> filesystem type with the -t option:
> 
> wolfi@amiga:~> udisksctl mount -b /dev/fd0 -t vfat
> Mounted /dev/fd0 at /run/media/wolfi/disk.
> wolfi@amiga:~> ls -la /run/media/wolfi/disk
> insgesamt 86
> drwx------  2 wolfi users  3584  1. Jän 1970  .
> drwxr-x---+ 3 root  root     60 24. Apr 20:05 ..
> -rw-r--r--  1 wolfi users 83968 16. Okt 2001  slides1.ppt
> 
> So the issue seems to be that udisks doesn't correctly identify the
> filesystem type.

Well, we can't identify it ahead of time as it would create a lot of
noise and there's no way to check if a new medium has been inserted. We
should probably special-case /dev/fd* and always just assume that it's
vfat...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/6

------------------------------------------------------------------------
On 2013-04-24T22:18:29+00:00 Wbauer wrote:

(In reply to comment #4)
> 
> Well, we can't identify it ahead of time as it would create a lot of noise
> and there's no way to check if a new medium has been inserted.

Aha. Thanks for the explanation, makes sense.

> We should probably special-case /dev/fd* and always just assume that
it's vfat...

Yes, I think that would be the best thing to do.

As it is now, you can't really use the floppy drive in graphical
environments like KDE and GNOME, although they do have a nice floppy
icon in their filemanagers...

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/7

------------------------------------------------------------------------
On 2013-07-07T08:29:41+00:00 Carlos Silva wrote:

I'm having this exact same problem but with an ext4 partitioned disk. Ext4 
partitions are just used on internal disks, they can be used on external ones 
too. But when this happens, this is the mounts I get:
/dev/sdc1 on /run/media/r3pek/6ef9a3f5-26fc-41eb-baa8-1f344b419725 type ext4 
(rw,nosuid,nodev,relatime,data=ordered,uhelper=udisks2)
/dev/sdd1 on /run/media/r3pek/7E11-ECF4 type vfat 
(rw,nosuid,nodev,relatime,uid=1000,gid=100,fmask=0022,dmask=0077,codepage=437,iocharset=iso8859-1,shortname=mixed,showexec,utf8,flush,

sdc is an external ext4 formated 1TB HD
sdd is a 1GB pen drive

both were user-mounted via udisks2 but it happens that the user can't create 
anything under sdc1's mount point, but it can on sdd1's. And this is why:
$ ls -lh /run/media/r3pek/
total 8.0K
drwxr-xr-x 4 root  root  4.0K Jul  3 17:55 6ef9a3f5-26fc-41eb-baa8-1f344b419725
drwx------ 7 r3pek users 4.0K Dec 31  1969 7E11-ECF4


Permissions should be enforced when creating the mountpoint, so that the owner 
of that directory is the user who requested the mount. Of course this should 
only be done for removable harddrives to prevent the user to mount the local 
filesystem and change anything in it.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/8

------------------------------------------------------------------------
On 2013-11-19T10:58:08+00:00 David Riebenbauer wrote:

(In reply to comment #4)
> (In reply to comment #3)
> > I just noticed that the floppy _is_ mounted as user when I specify the
> > filesystem type with the -t option:
> > 
> > wolfi@amiga:~> udisksctl mount -b /dev/fd0 -t vfat
> > Mounted /dev/fd0 at /run/media/wolfi/disk.
> > wolfi@amiga:~> ls -la /run/media/wolfi/disk
> > insgesamt 86
> > drwx------  2 wolfi users  3584  1. Jän 1970  .
> > drwxr-x---+ 3 root  root     60 24. Apr 20:05 ..
> > -rw-r--r--  1 wolfi users 83968 16. Okt 2001  slides1.ppt
> > 
> > So the issue seems to be that udisks doesn't correctly identify the
> > filesystem type.
> 
> Well, we can't identify it ahead of time as it would create a lot of noise
> and there's no way to check if a new medium has been inserted. We should
> probably special-case /dev/fd* and always just assume that it's vfat...

What about trying to identify it, directly before the mount? Or is that
what you meant anyway?

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/9

------------------------------------------------------------------------
On 2013-12-10T08:47:52+00:00 David Riebenbauer wrote:

Created attachment 90559
Patch to try to mount filesystems as calling user first.

This seems to be a regression, where udisks wouldn't try to mount
filesystems as the calling user first. This can be tested with any entry
with the user keyword and a fat filesystem. In my case an usb dongle.

UUID=10B3-837F /media/cruzer vfat
rw,nosuid,nodev,relatime,user,showexec,utf8,errors=remount-ro 0 0

Mounting the device with udisks results in the filesystem mounted as
root.

I've attached a patch to fix the problem. Please review.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/udisks2/+bug/1064195/comments/10


** Changed in: udisks
       Status: Unknown => Confirmed

** Changed in: udisks
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1064195

Title:
  No permission to access files on storage device  Ubuntu 12.04 does not
  allow me to access  Floppy Drive

To manage notifications about this bug go to:
https://bugs.launchpad.net/udisks/+bug/1064195/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to