# User permissions and cd drive



## sossego (Oct 8, 2009)

http://www.daemonforums.org/showthread.php?t=362

I had used this howto previously with kde3 on freebsd.
Is it still applicable?


----------



## SirDice (Oct 8, 2009)

sossego said:
			
		

> http://www.daemonforums.org/showthread.php?t=362
> 
> I had used this howto previously with kde3 on freebsd.
> Is it still applicable?



I quickly skimmed through it, looks like it's still applicable.

Also have a look at the HAL FAQ. Yes, it's based on GNOME but 99% of it is used by KDE too.


----------



## DutchDaemon (Oct 8, 2009)

If by 'still applicable' you mean 'for KDE3' ... probably yes. If you want to install the current version of KDE (4), there are some changes that may confound you.


----------



## sossego (Oct 8, 2009)

I do need it for kde4.
I saw the HAL FAQ  and noticed that any device not to be in fstab yet /dev/acd0 is there.
Could the kde4 solution be on a mailing list?
Do I remove/ comment out acd0 on fstab to enable use of HAL?


----------



## SirDice (Oct 8, 2009)

sossego said:
			
		

> I do need it for kde4.


The HAL solution is exactly the same. Not sure if you need to configure something in KDE itself though. Probably not.



> I saw the HAL FAQ  and noticed that any device not to be in fstab yet /dev/acd0 is there.
> {..}
> Do I remove/ comment out acd0 on fstab to enable use of HAL?



If you want HAL to manage it, yes, remove it from /etc/fstab.


----------



## sossego (Oct 8, 2009)

I was browsing through and saw this : http://forums.freebsd.org/showthread.php?t=5672 .

Should I go with gr1ml0ck's solution or with tkjacobsen's default setup?


----------



## sossego (Oct 10, 2009)

I've gone back to the howto and the CD can be read.
However, I am in the gnome session and the cd drive won't release the disc. 
What should I setup and configure so that the media can be accessed from any gui and any user?
Is it necessary to uncomment the entry in fstab and chmod or is it a group ownership?


----------



## Beastie (Oct 10, 2009)

I don't use KDE, so don't quote me. But you should probably comment it out. You may also have to be part of operator group (use pw(8)) and add the appropriate ownership and permission rules in /etc/devfs.conf.


----------



## sossego (Oct 11, 2009)

```
# chmod 666 /dev/acd0 /dev/cd0
chmod: /dev/cd0: No such file or directory
# ls /dev | grep cd0
acd0
```



Uncommented acd0 cdrom link.


----------



## Beastie (Oct 11, 2009)

That's fine. It only means you have an ATAPI CDROM drive (acd).

Did you try what I suggested? Did it change anything? Did it make things better? Worse?

You should give it a rootperator ownership and a 0660 permission. /etc/devfs.conf already contains examples. Just apply them to acdN.


----------



## sossego (Oct 12, 2009)

Yes. I changed own to rootperator and permissions to 0660.
KDE works fine with mounting. In the Gnome desktop, the drive will neither read nor release the media.
Will I need to add gnome enable along with the other values?


----------



## SirDice (Oct 12, 2009)

sossego said:
			
		

> Yes. I changed own to rootperator and permissions to 0660.
> KDE works fine with mounting. In the Gnome desktop, the drive will neither read nor release the media.
> Will I need to add gnome enable along with the other values?


As long as you have hald and dbus in /etc/rc.conf Gnome will use it. Have a look at your PolicyKit.conf.

http://www.freebsd.org/gnome/docs/halfaq.html#q3


----------



## sossego (Oct 12, 2009)

```
<?xml version="1.0" encoding="UTF-8"?> <!-- -*- XML -*- -->

<!DOCTYPE pkconfig PUBLIC "-//freedesktop//DTD PolicyKit Configuration 1.0//EN"
"http://hal.freedesktop.org/releases/PolicyKit/1.0/config.dtd">

<!-- See the manual page PolicyKit.conf(5) for file format -->

<config version="0.1">
    <match user="root">
        <return result="yes"/>
    </match>
    <define_admin_auth group="operator"/>
    <match action="org.freedesktop.hal.storage.mount-removable">
        <match user="sossego">
        <match user="macaco">
            <return result="yes" />
        </match>
    </match>

</config>
~
```

The PolicyKit.conf above.

I followed the commands given. same result.

In the PolicyKit/policy files, there are a six entries for hal.

Do these need to be edited?



Added: solved.
It seemed to be an error on my own part.


```
XML Parsing Error: mismatched tag. Expected: </match>.
Location: file:///usr/local/etc/PolicyKit/PolicyKit.conf
Line Number 20, Column 3:</config>
--^
```
I feel embarrassed.  The volume mounts and dismounts now.
Thanks.


----------



## DutchDaemon (Oct 12, 2009)

Please use 
	
	



```
tags for system output and code, please. They shouldn't be a secret anymore by now ..
```


----------



## sossego (Oct 12, 2009)

```
DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus)
```


----------



## sossego (Oct 14, 2009)

http://ubuntuforums.org/showthread.php?t=779992

I found this. I'm going to see if it works on Freebsd.

Edit : This works and should be added in. Gnome session releases discs.


----------

