Oh yes I did. Can I undo a chown easily?

Discussion in 'Server Operation' started by bigmatlem, Nov 17, 2016.

  1. bigmatlem

    bigmatlem Member

    I was in a root (dumb I know) and while transferring e-mail backups back to where they belonged I had to rechown the files. Well I was in /var/vmail and did the most idiotic thing I've done in a while. chown -R -v vmail:vmail .* which not only changed everything in vmail back to vmail (good) but also everything in /var and every file and subdirectory in /var (bad)

    Other than going through and manually fixing each file and directory is there an easier way to accomplish this?
  2. sjau

    sjau Local Meanie Moderator

    restore your backup
  3. bigmatlem

    bigmatlem Member

    That's what I had to do. No more late nights and distractions...

Share This Page