Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

/bin/chmod permissions

Discussion in 'Security' started by cpane1, Jan 27, 2010.

  1. cpane1

    cpane1 Well-Known Member

    Joined:
    Jun 10, 2007
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    156
    Hello,

    In order to prevent hacks we tend to chmod 000 /usr/bin/wget and find...but while doing this, one of our tech ultimately chmoded the /bin/chmod to 0000.

    Please help me to recover the permissions over /bin/chmod


    Any one any solutions ?


    [root@alerts ~]# touch 1234
    [root@alerts ~]# chmod 777 1234
    -bash: /bin/chmod: Permission denied
    [root@alerts ~]# /bin/chmod 777 1234
    -bash: /bin/chmod: Permission denied
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. anushkumar

    anushkumar Well-Known Member

    Joined:
    May 14, 2005
    Messages:
    57
    Likes Received:
    1
    Trophy Points:
    158
    cPanel Access Level:
    Root Administrator
    Try Copying chmod file from another server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jpetersen

    jpetersen Well-Known Member

    Joined:
    Dec 31, 2006
    Messages:
    113
    Likes Received:
    4
    Trophy Points:
    168
    Code:
    [root@host ~]# cd /bin
    [root@host /bin]# cp -p ls chmod.new
    [root@host /bin]# cp chmod chmod.new
    [root@host /bin]# mv chmod.new chmod
    
     
  4. cpane1

    cpane1 Well-Known Member

    Joined:
    Jun 10, 2007
    Messages:
    56
    Likes Received:
    0
    Trophy Points:
    156
    Moving the chmod file from a different server did work, but I think that is not a great way of solving the issue, but that did worked....

    Also as jpetersen suggested worked...

    [root@alerts bin]# cp -p ls chmod.new
    [root@alerts bin]# cp chmod chmod.new
    cp: overwrite `chmod.new'? y
    [root@alerts bin]# mv chmod.new chmod
    mv: overwrite `chmod'? y
    [root@alerts bin]# ls -lah /bin/chmod
    -rwxr-xr-x 1 root root 38K Jan 28 01:40 /bin/chmod
    [root@alerts bin]#


    Thanks, issue fixed... :)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice