LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 05-21-2014, 06:01 AM   #1
clcbluemont
Member
 
Registered: Feb 2009
Distribution: Slackware
Posts: 116
Blog Entries: 3

Rep: Reputation: 15
DBus setting user perms for sr0


Running CentOS 6.5 users are being permitted write access to the cdrom/DVD burner due to an ACL. Users in the cdrom group should be the only ones permitted write access.
ls -l /dev/sr0
brw-rw----+ 1 root cdrom 11, 0 May 21 02:43 /dev/sr0

Booted in level 3, Pre-login sr0 permisions:
getfacl /dev/sr0
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: cdrom
user::rw-
group::rw-
mask::rw-
other::---

Post login with idp account,:
getfacl /dev/sr0
getfacl: Removing leading '/' from absolute path names
# file: dev/sr0
# owner: root
# group: cdrom
user::rw-
user:idp:rw-
group::rw-
mask::rw-
other::---

The messagebus(DBus) seems to be setting this, but how and why? I say Dbus, because if the messagebus service is stopped the user specific permissions don't change when a user logs in.
 
Old 05-23-2014, 11:07 AM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
You probably made your burner accessible to everybody when you set up your burner software so D-BUS is just doing what you told it to do.
Try to reinstall the burner software "single user only" for an authorized and non-authorized account and test it instead of a single installation using root-like authority (hence deriving "p_owner" rights from the installer) assuming you have an account that can install software but is blocked from the disk.
 
Old 06-06-2014, 12:25 PM   #3
clcbluemont
Member
 
Registered: Feb 2009
Distribution: Slackware
Posts: 116

Original Poster
Blog Entries: 3

Rep: Reputation: 15
I think I have a solution better than the one originally suggested. Please, let me know if you see any holes in this approach.
1) Changed /usr/libexec/gvfsd-burn, /usr/bin/wodim, and /usr/bin/brasero to 750
2) Changed /usr/libexec/gvfsd-burn, /usr/bin/wodim, and /usr/bin/brasero to group dto
3) Created group dto
4) Added root and DTO users to dto group

Beware that patches may change these setting!

This does not change the fact that the DBUS daemon or some related service is dynamically applying an ACL giving all users write access to CD/DVD. It just prevents the users from accessing the tools used to burn disks.

If you add other tools like k3b for example, you will need to change the group and permissions on those as well.


PS.
This may sound like a simple solution, but it was not apparent what tool Nautilus was calling to do its burning (gvfsd-burn). And the dynamic ACL problem was a challenge I was reluctant to back away from.
 
Old 06-06-2014, 04:32 PM   #4
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
And the dynamic ACL problem was a challenge I was reluctant to back away from.
I appreciate that and I found your efforts very informative, which is helpful for future issues.
Still, I'd do the install/re-install just to avoid having the problem pop back up later, we had a several sets of kernel patches in the last couple of changelogs so kernel maintenance seems to be our maintainers passion at the moment.
 
  


Reply

Tags
acl, dbus, permissions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mount command show /dev/sr0 .what sr0 is representing ? gardenair Linux - Newbie 5 03-09-2012 11:27 AM
How do I set mysql perms for user created DB's? Usalabs Linux - Server 2 02-08-2012 08:40 PM
Setting perms for a newly mounted partition? redkazan Linux - Newbie 8 12-31-2003 04:59 PM
trouble setting perms for USB drive (Lacie databank) MadCactus Linux - Hardware 0 10-26-2003 08:02 AM
newbie: accessing sr0 as normal user Arcades Slackware 6 07-09-2003 01:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration