Find the answer to your Linux question:
Results 1 to 8 of 8
hi, i cant change rights of a folder although am connected as root, i typed : chmod 777 cdrom and it said : read only acess , what can i ...
  1. #1
    Just Joined!
    Join Date
    Apr 2010
    Posts
    15

    problem in modifying rights of a directory

    hi,

    i cant change rights of a folder although am connected as root,
    i typed : chmod 777 cdrom

    and it said : read only acess ,

    what can i do please ?


    best regards

  2. #2
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,099
    hmm,
    "cdrom" sounds like there is a CD drive (or more precise its media) mounted there.
    And cdrom are physically read only, so no way of changing that with chmod.

    Can you please do this and post the output here:
    Code:
    mount
    You must always face the curtain with a bow.

  3. #3
    Just Joined!
    Join Date
    Apr 2010
    Posts
    15
    /dev/sda2 on /type ext3(rw)
    none on /proc/bus/usb type usbdevfs (rw)
    /dev/sdal on/boot type ext3 (rw)
    none on /dev/pts type devpts (rw,gid=5,mode=620)
    none on /dev/shm type tmpfs(rw)
    /dev/cdrom on/mnt/cdrom type iso9660 (ro,nosuid,nodev)


    cdrom is a file under mnt under /

  4. #4
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,099
    Quote Originally Posted by dridi0wafa View Post
    /dev/cdrom on/mnt/cdrom type iso9660 (ro,nosuid,nodev)
    Jep, as I thought:
    It is a cdrom, and you cannot write to these.
    You must always face the curtain with a bow.

  5. #5
    Just Joined!
    Join Date
    Apr 2010
    Posts
    15
    its not a cdrom, its a file called cdrom in my redhat linux, the path is /mnt/cdrom

  6. #6
    Linux Guru Irithori's Avatar
    Join Date
    May 2009
    Location
    Munich
    Posts
    2,099
    /mnt/cdrom is a directory. ok
    But a cdrom device is mounted to it (/dev/cdrom)

    That device is readonly.
    Therefore the directory /mnt/cdrom is readonly.

    You can do the following to test that:
    Code:
    umount /mnt/cdrom
    chown 777 /mnt/cdrom
    ls -lad /mnt/cdrom
    touch /mnt/cdrom/delete.me
    ls -la /mnt/cdrom/
    rm /mnt/cdrom/delete.me
    mount /dev/cdrom /mnt/cdrom
    touch /mnt/cdrom/delete.me
    The second touch /mnt/cdrom/delete.me will fail.
    As I said, a cdrom cannot be written to.
    You must always face the curtain with a bow.

  7. #7
    Just Joined! its_really_me's Avatar
    Join Date
    Mar 2010
    Location
    Germany
    Posts
    24
    If your cdrom is mounted to this directory by accident, check out your settings in /etc/fstab - but usually this main directory /mnt is where mounted drives go. As you see in mount, it is mounted as filesystem type iso9660 and as read only (ro) --> you can not write to that.

  8. #8
    Linux User twoHats's Avatar
    Join Date
    Jan 2005
    Location
    NH, USA
    Posts
    276

    Just in case ...

    Quote Originally Posted by dridi0wafa View Post
    its not a cdrom, its a file called cdrom in my redhat linux, the path is /mnt/cdrom
    Just in case you didn't believe the other two posters:

    - yes cdrom is a device mounted to a file so you can access it

    - the device is a CDROM - (Compact Disk Read Only Memory) which is ...ta da... read only.

    Hats off to Irithori for patience way beyond the call of duty!
    - Clouds don't crash - Bertrand Meyer

    registered Linux user 393557

    finally - hw to brag about - but next year it will look pitifully quaint:
    Athlon64 X2 3800 - 1G PC3200 - 250G SATA - ati radeon x300
    circa 2006

Posting Permissions

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