Background: I made a rookie mistake on a Ubuntu 14.04 VM & recursively changed the permissions on the /etc folder. I've been restoring them to default 1 directory at a time, using a fresh VM as a model and looking up the proper permissions at apt-browse.org when the files don't exist on the 'model' VM. When I got to the /etc/skel directory, the permissions were 660 on .bash_logout, .bashrc, and .profile, but according to the model & apt-browse.org, they should be 644. After browsing to /etc/skel, I ran sudo chmod 644 .* and then ran ls -la.
From that point forward I could no longer invoke sudo, nor could I run any shell commands, including browsing, listing files, etc. See
x@Y:/etc/sgml$ cd /etc/skel/ && ls -la
total 28
drwxr-xr-x 2 root root 4096 Oct 10 2014 .
drwxr-xr-x 129 root root 12288 Sep 12 15:39 ..
-rw-rw---- 1 root root 220 Mar 18 2013 .bash_logout
-rw-rw---- 1 root root 3637 Apr 23 2014 .bashrc
-rw-rw---- 1 root root 675 Mar 28 2013 .profile
x@Y:/etc/skel$ sudo chmod 644 *
chmod: cannot access '*': No such file or directory
x@Y:/etc/skel$ sudo chmod 644 .*
x@Y:/etc/skel$ ls -la
ls: cannot open directory .: Permission denied
x@Y:/etc/skel$ sudo ls -la
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
x@Y:/etc/skel$ sudo su
sudo: unable to stat /etc/sudoers: Permission denied
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
Additionally, the websites on the server now throw a 403 error: You don't have permission to access / on this server. Server unable to read htaccess file, denying access to be safe
I don't have physical access to the server, so recovery mode boot is problematic. Also, why did this permission change break things? According to the documentation, it was the right thing to do.