You are not logged in.

#1 2006-03-26 10:48:21

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

CD owned by root:root instead of root:optical

Udev-Rules are the genuine ones:

# permissions for SCSI CD devices
BUS=="scsi", KERNEL=="sr[0-9]*", SYSFS{type}=="5", NAME="scd%n", GROUP="optical"
BUS=="scsi", KERNEL=="sg[0-9]*", SYSFS{type}=="5", NAME="%k", GROUP="optical"

Fstab is hardly tweaked:

/dev/scd0       /mnt/dvd    iso9660,udf       ro,user,noauto,unhide   0      0

Device node is owned by root and optical as it should

ls -l /dev/scd*
brw-rw----  1 root optical 11, 0 2006-03-26 13:38 /dev/scd0

But gnome tells me /mnt/dvd was owned by root:root. I can mount the disk, but can't copy ore execute something.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#2 2006-03-26 11:00:34

MAC!EK
Member
Registered: 2005-09-27
Posts: 267

Re: CD owned by root:root instead of root:optical

I hava a similar problem iwith cdemu, every time I load cdemu module /dev/cdemu has root:root instead of root:optical

Offline

#3 2006-03-26 12:40:00

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: CD owned by root:root instead of root:optical

Moo-Crumpus wrote:

But gnome tells me /mnt/dvd was owned by root:root. I can mount the disk, but can't copy ore execute something.

Mounting has nothing to do with the permissions to the device nodes. It also has nothing to do with the permission of the mountpoint before mounting (which are always root:root).

There are 2 scenarios if you mount your cd/dvd drive as user:

1) You mount a "normal" CD that has not ben enhanced with *nix permissions. In this case, the CD is owned by the user who mounts it, and the modes are set like specified in fstab.

2) The CD has *nix permissions (it's a iso9660 extension, I forgot the name.). In this case, the ownerships and modes are set like defined on the CD. You can, for example, create a CD with a / owned by root:root and with mode 700, in which case you can never cd to it without root privileges. Maybe you can prevent this by using the "norock" option, but I can not be sure.

Offline

#4 2006-03-26 12:47:02

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: CD owned by root:root instead of root:optical

Right, the mountpoints are allways root:root. But the point is, when I mount the dvd in gnome (doubleclicking the dvd optject in gnome) the mounted object is owned by root:root, and all the files are, too. Furthermore, I can't copy ore execute things on it. If I mount it by hand (console and command) it is owned by root:root two, but I can copy and execute things on it. Scary!


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#5 2006-03-26 14:50:23

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: CD owned by root:root instead of root:optical

Can I get the output of the mount command for both cases - and some ls -lF of the mount point?

Offline

#6 2006-03-26 14:58:30

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: CD owned by root:root instead of root:optical

dr-xr-xr-x  1 root root 2048 2004-03-04 19:13 dvd/
drwxr-xr-x  2 root root    1 2006-01-24 22:25 fl/
drwxr-xr-x  2 root root    1 2006-03-25 11:51 usb/

The mount commands?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#7 2006-03-27 10:21:02

brain0
Developer
From: Aachen - Germany
Registered: 2005-01-03
Posts: 1,382

Re: CD owned by root:root instead of root:optical

I think you didn't understand me:

1) Mount the CD/DVD on the console, then type "mount" and post the line that shows the CD (including the options). Then ls -lF the contents of the CD and post it. Umount again

2) Mount the CD/DVD using that gnome stuff. Then again type "mount" on the console, post the CD line, ls -lF the contents of the CD and post it.

This way we could maybe find out what gnome does different.

Offline

#8 2006-03-27 11:51:53

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: CD owned by root:root instead of root:optical

Ah, ok, will do it soon when I am at home.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#9 2006-03-27 17:32:50

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: CD owned by root:root instead of root:optical

Gnome:

mount
/dev/sdb1 on / type jfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/sdc1 on /home type jfs (rw)
/dev/sda1 on /boot type jfs (rw)
/dev/sda3 on /var type jfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/scd0 on /mnt/dvd type iso9660 (ro,noexec,nosuid,nodev,unhide,user=moo)

ls -lF /mnt/dvd
insgesamt 28970
-r-xr-xr-x  1 root root       53 2004-03-04 02:47 AutoRun.inf*
dr-xr-xr-x  1 root root     2048 2004-03-04 19:23 CD1/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:21 CD2/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:20 CD3/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:19 CD4/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:16 CD5/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:14 CD6/
-r-xr-xr-x  1 root root    24576 2004-03-04 02:57 Setup.exe*
-r-xr-xr-x  1 root root 29627635 2004-03-04 10:42 linux-installer.sh*

Manually:

 mount
/dev/sdb1 on / type jfs (rw)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
/dev/sdc1 on /home type jfs (rw)
/dev/sda1 on /boot type jfs (rw)
/dev/sda3 on /var type jfs (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/scd0 on /mnt/dvd type iso9660 (ro,noexec,nosuid,nodev,unhide,user=moo)

Looks the same to me. And after all, to my surprise, it works today. Self healing...


ls -lF /mnt/dvd
insgesamt 28970
-r-xr-xr-x  1 root root       53 2004-03-04 02:47 AutoRun.inf*
dr-xr-xr-x  1 root root     2048 2004-03-04 19:23 CD1/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:21 CD2/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:20 CD3/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:19 CD4/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:16 CD5/
dr-xr-xr-x  1 root root     2048 2004-03-04 19:14 CD6/
-r-xr-xr-x  1 root root    24576 2004-03-04 02:57 Setup.exe*
-r-xr-xr-x  1 root root 29627635 2004-03-04 10:42 linux-installer.sh*


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

Board footer

Powered by FluxBB