Find the answer to your Linux question:
Results 1 to 6 of 6
I know I am going to be terribly embarrased by this - I already am. But I shall appeal to those of you who have also made mistkaes. Due to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2006
    Posts
    3

    Hugely stupid mistake / file permissions


    I know I am going to be terribly embarrased by this - I already am. But I shall appeal to those of you who have also made mistkaes.

    Due to a really stupid programming error (i.e. a bad loop) I had a "chown" go wildly out of control inside this loop. Instead of running through a series of directories starting within a certain top level, it found it's way moving UP the chain to / and did a chown on the ENTIRE system. Now, on a FC4 system, every file on the system, including of course, the OS itself, is owned by the same user and group!!

    AHH!!! is there ANYWAY I can fix this? Is there someplace that I can find at least what the ownerships of each /, /etc, /var /usr and more should be?

    HELP!!!

    Thanks
    Julie

  2. #2
    Administrator MikeTbob's Avatar
    Join Date
    Apr 2006
    Location
    Texas
    Posts
    7,864
    Quote Originally Posted by histar2
    I know I am going to be terribly embarrased by this - I already am. But I shall appeal to those of you who have also made mistkaes.

    Due to a really stupid programming error (i.e. a bad loop) I had a "chown" go wildly out of control inside this loop. Instead of running through a series of directories starting within a certain top level, it found it's way moving UP the chain to / and did a chown on the ENTIRE system. Now, on a FC4 system, every file on the system, including of course, the OS itself, is owned by the same user and group!!

    AHH!!! is there ANYWAY I can fix this? Is there someplace that I can find at least what the ownerships of each /, /etc, /var /usr and more should be?

    HELP!!!

    Thanks
    Julie
    I feel your pain.
    This is out of my league, but I would guess you need to reinstall your OS.
    In my opinion there is way too many files, groups and owners to try manually chmod'ing everything.
    I do not respond to private messages asking for Linux help, Please keep it on the forums only.
    All new users please read this.** Forum FAQS. ** Adopt an unanswered post.

    I'd rather be lost at the lake than found at home.

  3. #3
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    hi histar2 !!!

    this is really a big mistake....
    on terminal log in as root and type these command

    $ chown -R root /

    $ cd home

    change ownership of all the users ... e.g. for user1

    $ chown -R user1 user1

    you have to repeat this for every user...
    i hope this will work.....

    <=== { casper } ===>
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  4. #4
    Just Joined!
    Join Date
    Aug 2006
    Posts
    3

    but that misses the OS...

    I have already fixed all my users -- that was easy since I scripted it from the passwd file, but the OS is still a bit messed up. I have set most of everything at least to root ownership or bin in the case of /bin and /usr/bin. It can't be worse than it was, that is for sure. I can't re-install the OS, since it is in a co-location far away from me. I could build a new disk and ship it to them to swap, but even that is a bit of a pain.

    I am thinking I will build another FC4 machine locally and then write something to replicate the ownership - my only other option.

    thanks for the replies so far though..
    Julie

  5. #5
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    Try making everything that shouldn't be executable 644, and everything that should be 755. Obviously don't set /etc/shadow to this...

    That's really just coverall, it should be a lot more detailed than that but it will be a big start.

  6. #6
    Just Joined!
    Join Date
    Aug 2006
    Posts
    3

    Need to clarify...

    Sorry, I guess I was not clear. None of the permissions hve changed - only ownership. Permissions are fine. I guess I am just going to install an FC4 version on another machine and script a "reset" program to fix my remote system.

    thanks
    Julie

Posting Permissions

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