Results 1 to 16 of 16

Thread: SSH

  1. #1
    Join Date
    Aug 2007
    Location
    Oakham England
    Posts
    499

    SSH

    Hey,

    is there an edit, undo in SSH, I have just done something really stupid and changed the owner of every file in the root of the server =/

    Using: chown -R brooke:brooke *

    Dan
    Streama - Your WordPress Friend
    http://www.streama.co.uk

  2. #2
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,429
    Hi Dan

    Afraid not... did you do this in / ? (just re read it)

    Do you have backups ?

    good luck.

  3. #3
    Join Date
    Aug 2007
    Location
    Oakham England
    Posts
    499
    Yes, I did it on /

    I did chown -R root:root *

    Would that work?

    I have backups of the accounts.

    Dan
    Streama - Your WordPress Friend
    http://www.streama.co.uk

  4. #4
    Join Date
    Aug 2007
    Location
    Oakham England
    Posts
    499
    Actually it was on ~
    Streama - Your WordPress Friend
    http://www.streama.co.uk

  5. #5
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,429
    Hi Dan

    the root:root wouldnt work either as lots of things rely on different users.

    The reason I asked about backups is that you may be better re installing the server and restore from your backups... as doing what you have done has probably really screwed things up.

    Thanks

  6. #6
    Join Date
    Aug 2007
    Location
    Oakham England
    Posts
    499
    I didnt let it do everything I realised what I did as soon as I did it, so I q and stopped it... it only did a few files in the ~ and everything still seems to work....

    Dan
    Streama - Your WordPress Friend
    http://www.streama.co.uk

  7. #7
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,429
    In that case you maybe ok

  8. #8
    Join Date
    Aug 2007
    Location
    Oakham England
    Posts
    499
    All seems to be still working, after a reboot, and I also cross checked against another server with the same config, to check the owners were correct and they are....

    The only issue I have is when I try to create an account on WHM, it doesnt set-up the DNS correctly... it just sends websites to the server defalt page, but if I go to the test address using http://IP/~usernamne and thats all working?

    Any idea?
    Streama - Your WordPress Friend
    http://www.streama.co.uk

  9. #9
    You can list out the permissions and find out which is changed then change back the permissions.

  10. #10
    Join Date
    Aug 2007
    Location
    Oakham England
    Posts
    499
    Can anyone help, I dont think this is related...

    I created a new account on WHM... All created fine...

    When I click on the domain... it does to the Default server page... but when I click on the IP I can see the index.php file...

    But on a domain I made a few weeks ago, when I open the domain I can see it, but then I click the IP address (http://IP/~username) it says 404 Cant be found?

    Anyone got any idea whats going on with it?

    Dan
    Streama - Your WordPress Friend
    http://www.streama.co.uk

  11. #11
    Join Date
    Aug 2007
    Location
    Oakham England
    Posts
    499
    The 404 on the domain is because of our htaccess file, but the domain is still an issue =/
    Streama - Your WordPress Friend
    http://www.streama.co.uk

  12. #12
    Join Date
    Jul 2009
    Location
    Kshatriya
    Posts
    2,725

    Quote Originally Posted by Danny159 View Post
    The 404 on the domain is because of our htaccess file, but the domain is still an issue =/
    For a security reason I will recommended you to take a backup of your server configuration and /home files and some other imporant files then reload new OS.
    Dewlance® Cheap Windows VPS - Chicago/Orlando/Vegas/AZ - SSD
    WHMCS ReadyMadeKB - Tutorials for cPanel/InterWorx/Softaculous& Growing..
    Super Cheap Annually Shared Hosting - Canada/US/UK

  13. #13
    Join Date
    May 2006
    Location
    NJ, USA
    Posts
    6,456
    Quote Originally Posted by DewlanceHosting View Post
    For a security reason I will recommended you to take a backup of your server configuration and /home files and some other imporant files then reload new OS.
    That is some of the worst advice I've seen in a long time.

    @OP: Can you give me the exact command you ran and the absolute path to the folder you did it in?
    simplywww: directadmin and cpanel hosting that will rock your socks
    Need some work done in a datacenter in the NYC area? NYC Remote Hands can do it.

    Follow my "deals" Twitter for hardware specials.. @dougysdeals

  14. #14
    Join Date
    Dec 2007
    Location
    Indiana, USA
    Posts
    16,087
    If you did it in ~ then you did it in /root/ and realistically your server should be fine. If you did it in / then you're pretty well screwed if you don't have backups.
    Michael Denney - MDDHosting LLC
    New shared plans for 2016! Check them out!
    Highly Available Shared, Premium, Reseller, and VPS
    http://www.mddhosting.com/

  15. #15
    Join Date
    May 2006
    Location
    NJ, USA
    Posts
    6,456
    Quote Originally Posted by MikeDVB View Post
    If you did it in ~ then you did it in /root/ and realistically your server should be fine. If you did it in / then you're pretty well screwed if you don't have backups.
    Provided you can execute a command, there is a command you can run via RPM to restore all permissions for installed packages (aka the core of the server).

    Read:

    for restore in $(rpm -qa); do rpm --setperms $restore; done
    for restore in $(rpm -qa); do rpm --setugids $restore; done
    simplywww: directadmin and cpanel hosting that will rock your socks
    Need some work done in a datacenter in the NYC area? NYC Remote Hands can do it.

    Follow my "deals" Twitter for hardware specials.. @dougysdeals

  16. #16
    Join Date
    Jul 2009
    Location
    Kshatriya
    Posts
    2,725

    Talking

    Quote Originally Posted by Dougy View Post
    That is some of the worst advice I've seen in a long time.

    @OP: Can you give me the exact command you ran and the absolute path to the folder you did it in?
    Do you know some software are use root:username or some files required root:xyz

    For example: OP Install a firewall and firewall use own permission on folder /xyz but OP change permission of /xyz to root:root so maybe firewall stop working(just example)


    If you don't know exact permission,etc then I will recommended you to reload your OS(Don't play with server security)
    Dewlance® Cheap Windows VPS - Chicago/Orlando/Vegas/AZ - SSD
    WHMCS ReadyMadeKB - Tutorials for cPanel/InterWorx/Softaculous& Growing..
    Super Cheap Annually Shared Hosting - Canada/US/UK

Similar Threads

  1. SSH - WebHostingTalk Revolutionizes the Hosting Industry - SSH!
    By SoftWareRevue in forum Web Hosting Industry Announcements
    Replies: 0
    Last Post: 03-31-2010, 10:04 PM
  2. Replies: 0
    Last Post: 07-23-2009, 10:02 AM
  3. Replies: 0
    Last Post: 07-15-2009, 11:34 AM
  4. disabling SSH root access but enabling SSH keys how to do that?
    By sharmaine1111 in forum Hosting Security and Technology
    Replies: 7
    Last Post: 04-03-2009, 11:26 PM
  5. E-mail Alert on Root SSH Login but also all ssh users too ?
    By Ivan23 in forum Hosting Security and Technology
    Replies: 2
    Last Post: 12-11-2005, 10:05 PM

Posting Permissions

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