Take Ownership of Locked Files in Ubuntu

I recently installed a program through dpkg and then removed it with the dpkg -r command. However, I encountered some issues with folder permissions. The program I installed also created a security group which my username was not a part of. To take ownership of the files and remove them, I issued these commands:
  • Navigate to the directory above the locked directories.
  • chown -hR username /foldername
This changed the ownership of the folder and subfolders to my username, thus allowing me to remove the files.
*Note: If you are not logged in as root, then you will use the sudo prefix.

SSH into Linux Web Server and find what version of Apache it is running...

So I was sitting at my desk and was approached with a favor. They needed to know what type of web service was running on a specific server. All that was given to me was the name of the server. Ok, so first we need the IP of the server:
Ping servernames
That should give an output similar to this
  • PING servername (10.100.1.15) 56(84) bytes of data.

Now secure shell into the server by typing
ssh -l username ipaddress
Enter your password then once you have successfully connected, type uname -a to see the system details. This includes Kernel version, time stamp, computer name/hostname, and some other goodies.
Now to find the type of web service running, type:
httpd -v
This will give you the version of Apache that is running.

To find out what flavor of Linux the server is running, search /etc for a file that should have the distro-release. If that is all too tedious, then type rpm -qa. This will display all the packages installed, and you should see either some redhat, fedora, debian, or whatever version. That is usually a good indicator of which flavor is installed.