You are not logged in.

#1 2009-02-07 12:37:36

unranked
Member
From: Hungary
Registered: 2009-02-07
Posts: 20

[solved] Can't open directory: permission denied (after DVD mount)

Hello, everybody!

I searched in Google, and here in the Arch forums, but I can't find a solution.
The problem is, when I insert a CD or a DVD, it got mounted, but I can't open it as normal user. I got this:
"Can't open directory: permission denied", or something similar, I just translated.
error message.


~$ groups
disk wheel dbus hal video audio optical floppy storage power users

So, my user is part of the storage group. As root, of course, I can list the contents of the CD/DVD.

I encountered it with thunar-volman, and autofs aswell. Now I have autofs installed based on the wiki article, to me it seems properly.

/etc/fstab:

/dev/cdrom /media/cdrom    auto    defaults,ro,users,exec,owner,noauto    0 0
/dev/dvd   /media/dvd    auto    defaults,ro,users,exec,owner,noauto    0 0
/dev/fd0   /media/fd0    auto    users,sync,noauto,exec,rw    0 0
/etc/autofs/auto.media:

dvd -fstype=auto,ro,nodev,nosuid :/dev/dvd
cdrom -fstype=auto,ro,nodev,nosuid :/dev/cdrom
floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl

Maybe, I missed something important.

Last edited by unranked (2009-02-09 18:06:10)

Offline

#2 2009-02-07 12:51:11

fogobogo
Member
Registered: 2008-08-24
Posts: 83

Re: [solved] Can't open directory: permission denied (after DVD mount)

Hal handles permissions and ignores fstab afaik. Read the wiki about Hal. I'm pretty sure some solutions for it are there

Offline

#3 2009-02-07 15:18:24

unranked
Member
From: Hungary
Registered: 2009-02-07
Posts: 20

Re: [solved] Can't open directory: permission denied (after DVD mount)

Thanks for the advice. I'm done with the wiki, and edited the hal.conf. I changed the user="0" line to my user. But without this, it should work, because my user is in the storage group....

/etc/dbus-1/system.d/hal.conf

<policy user="unranked">
    <allow send_interface="org.freedesktop.Hal.Device.SystemPowerManagement"/>
    <allow send_interface="org.freedesktop.Hal.Device.VideoAdapterPM"/>
    <allow send_interface="org.freedesktop.Hal.Device.LaptopPanel"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume"/>
    <allow send_interface="org.freedesktop.Hal.Device.Volume.Crypto"/>
</policy>

Still no permission...

Offline

#4 2009-02-07 16:45:08

ssl6
Member
From: Ottawa, ON, CA
Registered: 2007-08-30
Posts: 594

Re: [solved] Can't open directory: permission denied (after DVD mount)

i think what i was told to do to fix this issue back when i encountered it was to comment out the lines in hal for the optical drives which i ahvent had a problem with

now im wondering, which is really the better solution?


this is a signature

Offline

#5 2009-02-07 17:03:14

presario
Member
From: Tashkent, Uzbekistan
Registered: 2008-12-07
Posts: 57
Website

Re: [solved] Can't open directory: permission denied (after DVD mount)

try to remove the 'owner' option from /etc/fstab


Running ArchLinux on Compaq Presario v2000

Offline

#6 2009-02-07 17:48:23

unranked
Member
From: Hungary
Registered: 2009-02-07
Posts: 20

Re: [solved] Can't open directory: permission denied (after DVD mount)

Removed it, but nothing changed, still got the 'permission denied' message...It's getting frustrating.
I removed the autofs, and installed the thunar-volman, reinstalled hal and dbus.
I'm using fluxbox btw, maybe it has something with this issue. But I think it's not. If I mount the CD/DVD in xterm, I still can't open the /media/dvd or /media/cdrom directory, ls can't list it. I'm out of ideas....

Offline

#7 2009-02-07 18:59:00

fogobogo
Member
Registered: 2008-08-24
Posts: 83

Re: [solved] Can't open directory: permission denied (after DVD mount)

checked the permissions to your mountfolder?

Offline

#8 2009-02-08 08:58:14

unranked
Member
From: Hungary
Registered: 2009-02-07
Posts: 20

Re: [solved] Can't open directory: permission denied (after DVD mount)

They are the default. But here is the output of ls -l before the mount.

$ ls -l /media

drwxr-xr-x 2 unranked root 4096 jan 29 18.12 cdrom
drwxr-xr-x 2 unranked root 4096 jan 29 18.12 dvd
drwxr-xr-x 2 unranked root 4096 jan 29 18.12 fd0

And after the mount.

$ ls -l /media

drwxr-xr-x 2 unranked root 4096 jan 29 18.12 cdrom
drwx------ 6 root root 2048 dec 5 10.16 dvd
drwxr-xr-x 2 unranked root 4096 jan 29 18.12 fd0

Offline

#9 2009-02-08 09:37:24

unranked
Member
From: Hungary
Registered: 2009-02-07
Posts: 20

Re: [solved] Can't open directory: permission denied (after DVD mount)

I've figured out, that the permissions are somehow messed up. I don't know the reasons yet. So, what if I do a chmod on the /media ?

Edit:

I did the chmod (chmod -R 0777 /media), and nothing changed. I still can't open the /media/dvd directory, when a DVD is mounted.

Last edited by unranked (2009-02-08 19:16:28)

Offline

#10 2009-02-09 12:10:19

unranked
Member
From: Hungary
Registered: 2009-02-07
Posts: 20

Re: [solved] Can't open directory: permission denied (after DVD mount)

I just created an another user, which I added to the optical,storage,disk,hal,users groups. With this newly created user I still got the permission denied on the /media/dvd or /media/cd. I can mount the drive, but can't list the contents. Yes, the hardware is ok, because it's new, and it worked in the past, and on other systems.

Edit:

I stopped the hal and dbus daemons (/etc/rc.d/hal stop and dbus stop), as user mounted the drive, and the results were the same.

Last edited by unranked (2009-02-09 12:18:33)

Offline

#11 2009-02-09 18:06:48

unranked
Member
From: Hungary
Registered: 2009-02-07
Posts: 20

Re: [solved] Can't open directory: permission denied (after DVD mount)

Commented out the dvd and the cd in /etc/fstab. It was too simple smile

Offline

#12 2010-04-09 20:05:48

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: [solved] Can't open directory: permission denied (after DVD mount)

Not sure if it worked properly or not, but why do I need to edit the fstab file for mounting DVDs?

Offline

#13 2010-04-09 21:21:20

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: [solved] Can't open directory: permission denied (after DVD mount)

MindTooth wrote:

Not sure if it worked properly or not, but why do I need to edit the fstab file for mounting DVDs?

You can use fstab or not...just don't use both hal and fstab at the same time, or you will run into the above issue.

Offline

#14 2010-04-10 13:40:07

MindTooth
Member
From: Norway
Registered: 2008-11-11
Posts: 331

Re: [solved] Can't open directory: permission denied (after DVD mount)

Somehow I guess it got fixed now. Removed HAL and started using udisks(udev). However, I edited the fstab file as well. Weird enough, it got fixed smile

Offline

Board footer

Powered by FluxBB