The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

/etc/ permission

Discussion in 'General Discussion' started by persianwhois, Aug 18, 2007.

  1. persianwhois

    persianwhois Well-Known Member

    Joined:
    Apr 18, 2007
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mahallat
    cPanel Access Level:
    Root Administrator
    Hi all,
    Every lammer can see our /etc or /var subdirectory and files with shell script!
    How can change /etc and /var permission without error?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's a "feature" of a shared hosting environment. The best you can do is to hide things for the purely curious:

    chmod -v 711 /etc /var
     
  3. persianwhois

    persianwhois Well-Known Member

    Joined:
    Apr 18, 2007
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mahallat
    cPanel Access Level:
    Root Administrator
    what is -v switch?
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    RTFM:

    man chmod
     
  5. persianwhois

    persianwhois Well-Known Member

    Joined:
    Apr 18, 2007
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Mahallat
    cPanel Access Level:
    Root Administrator
    Hello,
    Thanks for answer.
    i used chmod 711 /etc and /var

    drwxr-x--x 93 root root 12288 Aug 20 18:20 etc
    drwxr-x--x 25 root root 4096 Aug 17 21:32 var

    permission changed and attacker can't view /etc subdirectory and files, but
    attacker can see /etc/vdomainaliases/ and /etc/passwd and /var/named

    current permission is:

    drwxr-xr-x 2 root root 20480 Aug 20 15:45 vdomainaliases
    -rw-r--r-- 1 root root 11726 Aug 20 15:45 passwd
    drwxr-xr-x 4 root named 12288 Aug 20 14:27 named

    How can fix?
     
Loading...

Share This Page