Find the answer to your Linux question:
Results 1 to 10 of 10
Hi, I would appreciate someone could help me on changing access right of file system. I log in as root but whenever I tried to edit a file in the ...
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5

    Changing access right to file system

    Hi,

    I would appreciate someone could help me on changing access right of file system.

    I log in as root but whenever I tried to edit a file in the /etc directory, I got error msg indicating that the file permission is read only. When I tried to the the file permission with command " chmod 777 filename", the same error appear. I also can't change the rights for the /etc directory. Which belongs to root. Current the permission for /etc directory is drwxr-xr-r.

    Appreciate someone could provide some advice. Thank you in advance.

    Francis

  2. #2
    tpl
    tpl is offline
    Linux User
    Join Date
    Jan 2007
    Location
    cleveland
    Posts
    452
    welcome to the forum

    > I log in as root but whenever I tried to edit a file in
    > the /etc directory, I got error msg indicating that the
    > file permission is read only.

    with a normal installation, this will not happen. SFIK, only Ubuntu
    fails to create a root user: "sudo passwd root" is the fix.
    the sun is new every day (heraclitus)

  3. #3
    Linux Engineer rong's Avatar
    Join Date
    Feb 2005
    Location
    California
    Posts
    803
    Are you in "Rescue" mode? If so, files are read only.
    registered Linux user #388382

    Have you checked here first?

  4. #4
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    When I tried to change the password, I got "Cannot lock password file: already locked"

    I am not in rescue mode.

  5. #5
    JHB
    JHB is offline
    Just Joined!
    Join Date
    Jan 2007
    Location
    South Africa
    Posts
    22
    Check if your filesystem is mounted read-write or read-only

  6. #6
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    I am new in Linux. please advise how can I check?

    Thanks

  7. #7
    Linux Enthusiast
    Join Date
    Jul 2005
    Location
    Maryland
    Posts
    521
    Quote Originally Posted by francisleesc
    I am new in Linux. please advise how can I check?

    Thanks
    type:
    Code:
    mount
    and look for line that refers to / .
    It looks something like this:
    Code:
    /dev/hda1 on / type ext3 (rw,errors=remount-ro)
    The "rw" means it is mounted with "read and write" permissions.
    If it's "ro" then it's mounted with "read only" permissions

  8. #8
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    Yes it was mounted with read-only permission on those directories/files that I need to change.
    So how can I change to read-write?
    thank again

  9. #9
    Just Joined!
    Join Date
    Feb 2007
    Location
    South Africa
    Posts
    5
    I dont see any mention of your distro - is it a "Live CD"??

    In other words are you booting into Linux from a CD.

  10. #10
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    thanks all, I managed get around by issue 'mount -o remount,rw /'

Posting Permissions

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