chmod 777 /var.....BIG mistake

Posted on 2012-08-28
Last Modified: 2012-09-17
Hi Experts,

In trying to change the permissions of an EZPublish project on my server (sudo chmod 777 var/ -Rf) I inadvertently messed up and run this command: sudo chmod 777 /var -Rf.

I know this is a monumental mess up, and I know it's a long shot, but does anybody know if there's a way back? I'm absolutely desperate here.

Thanks in advance
Question by:TwistImage3530
    LVL 40

    Expert Comment

    What is your OS ?

    Do you have backup of var? you could restore from there!

    Accepted Solution


    Thanks for you response. It is a virtual machine running Ubuntu 10.0.4. I managed to restore from a snapshot from a while ago and have restored a full backup overnight. Although the situation seems rectified, I'm still curious if there is any way to reverse such a command. I know I'm probably dreaming in technicolor, and for sure will always make sure I don't chmod my /var again, but it would be nice for future reference.

    LVL 40

    Assisted Solution

    you may do full list of files and directories and files under /var and keep output in a file and then you can backup this file and later can be used as reference for such cases.

    find /var -exec ls -l {} \; > my_var_ref

    Author Closing Comment

    We didn't resolve the issue - we rebuilt from a snapshot though omarfarids response seems most helpful.

    Featured Post

    Want to promote your upcoming event?

    Attending an event? Speaking at a conference? Or exhibiting at a tradeshow? Easily inform your contacts by using a promotional banner in your email signature. This will ensure your organization’s most important contacts are in the know.

    Join & Write a Comment

    Samba is the de-facto standard program (or, more correctly: suite of programs) that UNIX and Linux systems use to share files with Microsoft Windows (and more recently, Mac OS-X) systems. Currently, there are 2 common versions of Samba available,…
    Goal:  To set up a secure SSH server for your home computer to make it accessible anywhere AND to use it as a port forwarding proxy. Steps 1.  WinSSHD version 5 is free for personal use.  So download and install it.  You can download it from the…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now