Results 1 to 7 of 7

Thread: cd permissions

  1. #1

    cd permissions

    I know this is probably a very easy question, but I didn't find the answer in the PETs or on a search, so here it goes...

    my cdrom works just fine as root (I can play cd's, etc) but when logged as a normal user, I get the "you do not have permission to /dev/cdrom". I did a chgrp so that /dev/cdrom is part of the "users" group (same as my normal user) but still the same errors come up...what am I missing?

  2. #2

    Re:cd permissions

    hello,
    i have this in /etc/fstab:

    Code:
    /dev/cdrom      /mnt/cdrom     iso9660 noauto,owner,kudzu,ro,unhide 0 0

  3. #3
    Mentor
    Join Date
    Jun 2001
    Posts
    1,672

    Re:cd permissions

    Edit your /etc/fstab file:

    Code:
    /dev/hdc  /cdrom  iso9660  defaults,user,noauto,ro  0  0

    Of course your cd rom might be something different than /dev/hdc, so only make sure you have the "defaults,user,noauto,ro" on that line. Unmount it as root ("umount /dev/cdrom&quot then remount it as a user (mount /dev/cdrom&quot. That should take care of it.



  4. #4
    Guest

    Re:cd permissions

    actually ro isn't required... once the kernel notices that it's a cd device it will automatically know to mount it as ro

    observe:
    /dev/cdrom /mnt/cdrom iso9660 noauto,user 0 0
    $ ls -las /dev/cdrom
    0 lrwxrwxrwx 1 root root 3 Jun 30 18:15 /dev/cdrom -> hdb
    $ ls -las /dev/hdb
    0 brw-rw---- 1 root users 3, 64 Jun 27 19:19 /dev/hdb
    $ mount /mnt/cdrom/
    mount: block device /dev/cdrom is write-protected, mounting read-only

  5. #5

    Re:cd permissions

    [quote author=cloverm link=board=1;threadid=4765;start=0#47406 date=1030587724]
    Edit your /etc/fstab file:

    Code:
    /dev/hdc  /cdrom  iso9660  defaults,user,noauto,ro  0  0

    Of course your cd rom might be something different than /dev/hdc, so only make sure you have the "defaults,user,noauto,ro" on that line. Unmount it as root ("umount /dev/cdrom&quot then remount it as a user (mount /dev/cdrom&quot. That should take care of it.



    [/quote]

    My cdrom is hdc...this is what ls -l /dev/cdrom shows:
    lrwxrwxrwx 1 root users 8 Aug 24 16:24 /dev/cdrom -> /dev/hdc
    and my /etc/fstab has:
    /dev/hdc /cdrom iso9660 defaults,user,noauto,ro 0 0
    umount as root tells me: /dev/cdrom: not mounted
    and when I try to mount as normal user I get: mount: wrong fs type, bad option, bad superblock on /dev/hdc, or too many mounted file systems


  6. #6

    Re:cd permissions

    [quote author=Ralinx link=board=1;threadid=4765;start=0#47408 date=1030588822]
    actually ro isn't required... once the kernel notices that it's a cd device it will automatically know to mount it as ro

    observe:
    /dev/cdrom /mnt/cdrom iso9660 noauto,user 0 0


    $ ls -las /dev/cdrom
    0 lrwxrwxrwx 1 root root 3 Jun 30 18:15 /dev/cdrom -> hdb
    $ ls -las /dev/hdb
    0 brw-rw---- 1 root users 3, 64 Jun 27 19:19 /dev/hdb
    $ mount /mnt/cdrom/
    mount: block device /dev/cdrom is write-protected, mounting read-only
    [/quote]

    tried this and got, when I tried to mount /mnt/cdrom
    mount: mount point /mnt/cdrom does not exist
    ???

    EDIT: despite the errors and whatnot, it seems to be working now...8)

  7. #7
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re:cd permissions

    when mounting please remember that there are 3 things you need to possibly do/tell linux.

    1) What is getting mounted
    2) What type of media/fs
    3) Where is it getting put in your fs tree

    So if you are getting an error in #3 (like the text seemed to say), make sure that /mnt/cdrom both exists, and is writable by that user.

    If it tells you that the media format sucks, try specifying -t iso9660 in the mount command as such:

    mount -t iso9660 /dev/hdc /mnt/cdrom

    Also, I have seen that on a few systems, you can also use /dev/cdrom as /dev/hdc (/dev/cdrom is a hard link to /dev/hdc). If you aren't using /dev/hdXX or whatever try doing so.

    These are general tips that I was told by the gurus that were struggling to teach this idiot (moi).

    HTH

Similar Threads

  1. Understanding and using Permissions
    By peter in forum Tutorials
    Replies: 0
    Last Post: 11-24-2008, 02:46 AM
  2. Postfix permissions...
    By countach44 in forum Linux - Hardware, Networking & Security
    Replies: 2
    Last Post: 07-22-2005, 04:51 PM
  3. file permissions
    By sentme_mail in forum Linux - General Topics
    Replies: 8
    Last Post: 11-20-2004, 04:39 AM
  4. TTY permissions problem
    By mcdougrs in forum Linux - General Topics
    Replies: 4
    Last Post: 06-28-2003, 12:58 PM
  5. Permissions
    By ASCI_Blue in forum Linux - General Topics
    Replies: 1
    Last Post: 11-09-2002, 07:36 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •