Root Access for Your Website

What is Root Access? What Can You Do With It?

Who cares about root access? Do you need it? If you do, what can you do with it? Learn about the Linux root, what it can do for you, and how a Unix-like operating system is organized as an upside-down tree.

 

  • Does it matter if you write root or Root?
  • The root user: the Linux version of Windows admin
  • What exactly is root access? (possible sources of confusion)
  • Linux as an upside-down tree
  • What can you do as root?
  • How to get root access for your website

 

Why is root lower case?

 

First, let’s get into root vs. Root. It is possible for a person to argue that this piece should have been entitled, “What is root access?” to make it clearer that the root user is in lower-case.

 

Remember that the root user is specific to Linux, BSD (Berkeley Software Distribution), and other Unix-like operating systems (see the next section regarding “Unix-like”). The bulk of Linux is written in C. Like some other computer languages (C++, Java, Ruby, XML, etc.) and in contrast to others (Pascal, SQL, Ada, etc.), C is a case-sensitive coding language. Because of that, well, it matters whether you write root or Root. Why do people choose lower-case over the capitalized version of a word? Let’s look at the discussion of why it might be used, or not used, to name a local variable – from a relatively popular post within Software Engineering Stack Exchange.

 

In the post, the user oscilatingcretin [sic] says he gets a lot of grief from other developers for capitalizing the first letter in words within his local variables. Standardly, coders will use employeeCount and firstName, as examples. Instead, oscilatingcretin would use EmployeeCount and FirstName in those instances. He uses capitalization across the board – for constants, properties, variables, return methods, void methods, etc. He notes that he even uses that same model within Javascript.

 

Why does this decision bother people? Well, because there is a certain logic to the non-use of capital letters in that context. The idea is that initial-caps of words – or “proper case” – within case-sensitive code is typically only a convention that is applied to void methods and properties; you should start with the lower case for methods that return a value and local variables, says this perspective.

 

Oscilatingcretin notes that he has too often felt that the supposed need to use this convention is perhaps more arbitrary than it is rational – although he does note that he has “never needed a casing convention to tell me whether or not something is a local variable or property” because he has “always used a very intuitive naming convention.”

 

The bottom line is that you should write root without a capital letter; and if you want, you can question whether the lack of a capital letter makes sense.

 

The root user: the Linux version of Windows admin

 

Have you worked with Windows servers? Then you are probably familiar with the administrator account. That, like root, is an example of a superuser account that is designated for system administration. The superuser name will vary depending on the operating system (OS).

 

It’s important to understand scope, so what exactly do we mean by Unix-like? According to the Linux Information Project, Unix-like is a term applied to computing operating systems to mean that it has numerous attributes that are similar to UNIX (created at Bell Labs by Ken Thompson in 1969) and the systems that followed soon after it.

 

A superuser account such as root is able to edit whatever server files they want and perform any other tasks without getting blocked due to a lack of sufficient permission. Specific tasks that you can accomplish when logged in as root are covered in the “What can you do as root?” section below.

 

What exactly is root access? (possible sources of confusion)

 

Within Linux or another Unix-like system, the root user – accessible with dedicated and some VPS servers – has overarching file access and command privileges. A term that can often be used interchangeably with root user is root account. The notion of root access can become a bit more muddled when you look at similar ways in which root is used within Linux, BSD, and similar (i.e. Unix-like) systems. Those are:

 

  • root directory (/) – The root directory is the top-level directory. To look at it from the bottom up, your files will typically be contained within subdirectories, which in turn are within directories, all of which are included in the root directory. A forward slash (this character – /), indicates the root directory.

 

  • slash root (/root) – Although this may sound like a sloppy effort at harvesting ingredients for sarsaparilla, it is actually the home directory of the root account (/root). In other words, it is the main place where the root user’s files (configuration and otherwise) are stored. Typically it is the location where a user will start when they log into Linux. Remember that the forward slash designates the root directory; that means slash root is a subdirectory of it. Any typical (non-root) home directories populate within a different default subdirectory of root, slash home (/home).

 

  • root privileges – This term refers to the capabilities that the root user has to control the system, distinct from those of other users. The root account is the king and queen of the castle, as described above. It has 100% management control, with full access to every command and file. Let’s get into these privileges in the next section.

 

  • rootkit – You may want root privileges, but you don’t want to get them through a rootkit, no matter how user-friendly its name may sound. A rootkit is applications that are clandestinely placed on a server by an unauthorized party, often for malicious reasons. The Linux Information Project notes that “well designed rootkits are able to obtain root access… and to hide most or all traces of their presence and activities.”

 

Linux as an upside-down tree

 

To better understand how the concepts in the above section interrelate, this account is called root because it has exclusive write permissions within the root directory – i.e. it can change any files contained therein.

 

The root directory is called that because the hierarchy of a Unix-like OS is designed to be similar to a tree, with everything sprouting and branching off from one directory that serves as the roots. Flip the tree over, and you see the hierarchy, with root on top.

 

What can you do as root?

 

This question could be rephrased as, “What are example root privileges?” That is essentially what we are talking about with privileges is the ability to do other stuff on your dedicated or VPS server (the latter provided you have full root access). Here are 5 broad examples of what you can do within this account:

 

  1. 1. Edit whatever files you choose
  2. 2. Change the system however you want
  3. 3. Provide and remove permissions to other accounts (which will affect whether they can read, change, or execute certain directories and files)
  4. 4. Install software server-wide (MySQL, Apache, etc.)
  5. 5. Set up configurations for software throughout the server

 

How to get root access for your website

 

You can get root access on a dedicated or virtual private server, provided this feature is available through your hosting provider. With a good service, logging in as root should be a snap. At KnownHost, support is something we pride ourselves on, so you can rest easy knowing we’ve got your back. See our full-root-access fully managed VPS plans.

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.