Results 1 to 2 of 2

Thread: How do I Undo a "chmod -R 777 on my /etc directory?

Hybrid View

  1. #1
    Senior Member registered user
    Join Date
    Feb 2004
    Posts
    237

    How do I Undo a "chmod -R 777 on my /etc directory?

    Hello....I had done chmod -R 777 /etc and the problem is, I cannot begin to configure my desktop computer to network with my laptop cause when I do this:

    dpkg-reconfigure ssh
    /etc/init.d/ssh start
    i get error saying my permissions on that folder are too open and it will not let me use ssh.

    How can I change the permissions on my /etc folder back to default permissions? thank you

  2. #2
    Senior Member registered user
    Join Date
    Aug 2004
    Location
    Sydney/Australia
    Posts
    311

    Re: How do I Undo a "chmod -R 777 on my /etc directory?

    >>
    Hello....I had done chmod -R 777 /etc and the
    problem is, I cannot begin to configure my
    desktop computer to network with my laptop cause
    when I do this:

    dpkg-reconfigure ssh
    /etc/init.d/ssh start

    i get error saying my permissions on that folder
    are too open and it will not let me use ssh.

    How can I change the permissions on my /etc folder
    back to default permissions? thank you
    >>

    bob58...

    hmmmmmmm....

    The hard way, more than likely. You did a recursive
    change mode. Setting everything "rwe". Not a
    good idea.

    You could try doing the recovery in a number of
    steps, that is, firstly do...

    ]# chmod 754 -R /etc

    Then go through each directory and make adjustments.
    The directories can be set to "755",
    non-recursive. Set the files to "544". Some
    files will need to be set to "500", such as
    lilo.conf, and other related security things.

    I like to kill all world access to directories/files myself.

    You may need to do a...

    ]$ dpkg -S path_to_file

    to find the various packages that files belong
    to. Then actually look into the packages to
    find their default permissions. But you will need
    actual packages to work with there.

    Or, find another box some where that you can
    template it off, which may be a better idea.
    That means pen and paper of course.


    You must have done that as "root".


    That's a good example of why we do not use our
    "root" account unless absolutly neccessary, buddy !!!!!

    If you have the Knoppix LiveCD handy, you
    could boot that up, mount your somewhat "open"
    system, and then use the default permissions from
    the ramdisk knoppix image to template a
    re-permissioning of your dedicated /etc directory.
    That may be the easiest way to do it.

    LiveCD's can be handy things, no ?

    A dual pane file manager will help there too (filerunner)

    Good Luck.

    jm

Similar Threads

  1. chmod question
    By jiohdi in forum MS Windows & New to Linux
    Replies: 4
    Last Post: 03-02-2005, 02:44 PM
  2. Persistent Home Directory failure on USB "flashdrive&qu
    By Honkeychops in forum General Support
    Replies: 0
    Last Post: 05-01-2004, 05:23 AM
  3. Boot Problem: "mount: No such file or directory"
    By LinuxGeek in forum Hdd Install / Debian / Apt
    Replies: 0
    Last Post: 12-20-2003, 07:30 PM
  4. Delay/Timeout when acessing "/mnt/" directory
    By ollisoft in forum General Support
    Replies: 3
    Last Post: 12-18-2003, 03:44 AM
  5. Replies: 3
    Last Post: 09-21-2003, 07:20 AM

Posting Permissions

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


Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p picture

Dell EMC PowerEdge R740 8 Bay Server w/ 32GB RAM 2x GOLD 6132 2x 1600W PSU H730p

$499.88



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Cores / 64gb / Raid / 2x 1Tb

$374.99



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD picture

Dell Poweredge R630 2x Xeon E5-2680 v3 2.5ghz 24-Core | HBA330 | No RAM or HDD

$169.99



Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO picture

Dell Poweredge R730xd 12LFF 2*2660v4 4*1Gbe h730 2x 750W Server CTO

$488.00



Dell Poweredge R810 4x Xeon X7560 2.26ghz 32-Cores | 256GB | 3x Trays | H700 picture

Dell Poweredge R810 4x Xeon X7560 2.26ghz 32-Cores | 256GB | 3x Trays | H700

$289.99



Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W picture

Dell PowerEdge C4130 1U AI GPU Server | 2x E5-2680 v3 | 32gb Ram | 2x 1600W

$409.99



Dell PowerEdge R640 10SFF 2x Gold 6140 2.3GHz 36-Cores 64gb H730p 2x 1.2TB picture

Dell PowerEdge R640 10SFF 2x Gold 6140 2.3GHz 36-Cores 64gb H730p 2x 1.2TB

$559.99



Dell PowerEdge R740 E38S001 Server E38S picture

Dell PowerEdge R740 E38S001 Server E38S

$660.00



8W81F Dell PowerEdge R840 24x SFF 4x Xeon Gold 6252 H730P 2x 1100W PSU picture

8W81F Dell PowerEdge R840 24x SFF 4x Xeon Gold 6252 H730P 2x 1100W PSU

$1100.00