DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th June 2009
zazen zazen is offline
Port Guard
 
Join Date: Feb 2009
Posts: 12
Default DVD access

Hi,all,

I'm having this really frustrating problem.
Perhaps I'm misunderstanding file permissions.

Here's the problem:

When I try to access my dvd at /dev/cd0c with ogle (and other players for that matter) my Openbsd will only allow this as root.
Now, I tried to create a video group, add myself and the directory to it. Resulting in the same error message(see end of post) as before.

Tried to make a ln -s of the dir, which results in a link that is in the wheel group, as I am i the wheel group and the read permission is set for "wheel"; shouldn't I be able to access the directory? That route didn't work either
.
The Openbsd FAQ doesn't go in to this and only offers a few examples of players to use.

Sorry to bring you this noob question, but I'm trying to switch all of my computers to OpenBSD and these multimedia features where kind of pre-configured in most of the linux distros that I used before I switched.

Anyway, thanks for your time, Z.

Code:
ERROR[ogle_nav]: faild to open/read the DVD
DVDSetDVDRoot:: Root not set
PS: my system is a standard OpenBSD 4.5 and the PKG binary install of Ogle.
Reply With Quote
  #2   (View Single Post)  
Old 4th June 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

I'm a bit confused, did you seriously change the group of the entire /dev directory to "video"?

OpenBSD already has a group called "operator" that users can join, this action was entirely unnecessary.

$ sudo user mod -G operator zazen

Also, you always use the raw device node unless you're mounting.. /dev/rcd0c vs /dev/cd0c.

Code:
crw-r-----  1 root  operator   15,   2 May  8 13:15 /dev/rcd0c
Ogle is rather old these days, it doesn't look maintained.. have you considered Mplayer or VLC media?

Have fun...
Reply With Quote
  #3   (View Single Post)  
Old 4th June 2009
zazen zazen is offline
Port Guard
 
Join Date: Feb 2009
Posts: 12
Default

Quote:
I'm a bit confused, did you seriously change the group of the entire /dev directory to "video"?
no, just the /dev/cd0c

Quote:
Also, you always use the raw device node unless you're mounting.. /dev/rcd0c vs /dev/cd0c.
Ah! thanks for that!
Would you be willing to provide a quick explanation why?

Quote:
Ogle is rather old these days, it doesn't look maintained.. have you considered Mplayer or VLC media?
Actually I'm quite pleased with it's performance.
VLC is giving me REALLY bad performance on OBSD for some reason.
Mplayer itself is great but Gmplayer crashes with compile errors. (Don't worry, I'll do my best to fix that myself without imposing even further on your time )

Thank you very much, learned something new once again.
Reply With Quote
  #4   (View Single Post)  
Old 4th June 2009
zazen zazen is offline
Port Guard
 
Join Date: Feb 2009
Posts: 12
Default

Quote:
The Openbsd FAQ doesn't go in to this and only offers a few examples of players to use.
Actually, giving the FAQ another quick once-over, it is described but it's under 13.3 playing audio cd's.
Reply With Quote
  #5   (View Single Post)  
Old 4th June 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Regular users can mount devices, under these rules:
  1. The sysctl kern.usermount is set to 1.
  2. The user has read or write access to the device, as required by the type of mount.
  3. The user is the owner of the directory being used as the mount point.
Reply With Quote
  #6   (View Single Post)  
Old 4th June 2009
zazen zazen is offline
Port Guard
 
Join Date: Feb 2009
Posts: 12
Default

So noted, thx. Z
Reply With Quote
  #7   (View Single Post)  
Old 4th June 2009
BSDfan666 BSDfan666 is offline
Real Name: N/A, this is the interweb.
Banned
 
Join Date: Apr 2008
Location: Ontario, Canada
Posts: 2,223
Default

Quote:
Originally Posted by zazen View Post
Ah! thanks for that!
Would you be willing to provide a quick explanation why?
Because block devices are only meant to be used when mounting, the kernel does some buffering that will probably negatively effect performance otherwise.

It's just something you should remember as a rule of thumb, many of the base tools are starting to reject block devices as arguments now.

Always use the raw character device if you aren't mounting.

@jggimi, it does seem that Ogle can play DVD's that are mounted.. but it's debatable if users should be allowed to mount at all, it probably makes more sense to allow access to the device node.. either through the operator group or via some fbtab magic.
Reply With Quote
  #8   (View Single Post)  
Old 4th June 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Of course, mounting isn't required for playing video DVDs and is not possible for audio CDs. A/V players are designed to use the raw devices, though for DVDs, one can mount them (they're bridged UDF/CD9660 filesystems) and use players with the VOB sets, if desired.

Block devices are only required for mounting filesystems, and will degrade performance if used for other purposes. Raw is recommended, and, for some operations, such as formatting partitions or burning optical media, raw devices are required. e.g.: compare the results from these two commands, run on an unmounted partition:

# time dd if=/dev/wd0g of=/dev/null count=10000
# time dd if=/dev/rwd0g of=/dev/null count=10000
Reply With Quote
  #9   (View Single Post)  
Old 4th June 2009
zazen zazen is offline
Port Guard
 
Join Date: Feb 2009
Posts: 12
Default

You guys are in serious danger of losing your bad boy reputation of being unwilling to help noobs
Reply With Quote
Old 4th June 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

Have you seen this?
Reply With Quote
Old 4th June 2009
zazen zazen is offline
Port Guard
 
Join Date: Feb 2009
Posts: 12
Default

Code:
$ time dd if=/dev/wd1a of=/dev/null count=1000
1000+0 records in
1000+0 records out
512000 bytes transferred in 0.014 secs (34434057 bytes/sec)
    0m0.02s real     0m0.00s user     0m0.00s system
$ time dd if=/dev/rwd1a of=/dev/null count=1000
1000+0 records in
1000+0 records out
512000 bytes transferred in 0.140 secs (3634144 bytes/sec)
    0m0.14s real     0m0.00s user     0m0.07s system
Ok, first this was fun now it's embarrassing This litle raw vs block issue also seems to have solved my "poor" performance on vlc (at least for dvd playback)
Reply With Quote
Old 4th June 2009
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

1000 blocks is not a fair test. Try 100,000. Or the whole partition. And you can try with large blocksizes, too. (e.g.: bs=10m)
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh access carpman FreeBSD Security 8 19th February 2009 12:26 PM
Securing ftp access AlexDudko FreeBSD Security 6 12th January 2009 09:21 PM
pf allow ftp access ijk FreeBSD Security 9 25th August 2008 04:12 AM
ssh/external access jwhal OpenBSD General 11 21st May 2008 07:19 PM
CD Access in KDE Scott FreeBSD General 10 13th May 2008 05:48 AM


All times are GMT. The time now is 03:48 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick