In this article, we will show you how to install GCC on an Ubuntu 18.04 server.
If we use the apt command to install GCC from a repository, we will have the default GCC version (GCC 7.4). However, if you want the latest version of GCC, you will need to install it from source. Version 8 of GCChas complete C++11, C++14 support, partial C++17 support, and experimental C++2a support. With GCC 8, C11 and C++14 support are enabled by default, and there is no need to add -std=c11 or -std=c++14. Let’s get started.
In this article, we will show you how to install PrestaShop on Ubuntu 18.04 LTS.
PrestaShop is a free shopping cart platform written in the PHP programming language with support for the MySQL database management system. PrestaShop is used to build and run an online store and it is very easy to use. With PrestaShop, you can share your ideas and products and sell them on the internet. Let’s get started.
In this tutorial, we will be installing Moodle on an Ubuntu 18.04 server.
Moodle is a well-known open-source learning management system written in PHP. With its customizable features, people all over the world are using Moodle to create websites to run and manage their online courses. Moodle enables us to conduct face-to-face online learning and training, as well as grading and testing. We can create assignments, quizzes, homework, and so on.
Moodle was originally released in 2002 and has been translated to over 100 languages ever since, making it accessible to as many students and teachers as possible. The installation process shouldn’t take much time, so let’s get started. (more…)
In this tutorial, we will show you how to install MediaWiki on Ubuntu 18.04 server.
MediaWiki is a free and open-source application that allows anyone to create a wiki website of their own on a self-hosted server. MediaWiki is one of the most popular wiki platforms in the world, thanks to its ease of use and great customizability. MediaWiki is written in the PHP programming language, which leads to excellent performance as well. Let’s get started with the installation.
In this article, we will show you how to install Jenkins on Ubuntu 18.04.
Jenkins is an open-source automation server written in Java. In a nutshell, this software helps to automate the repetitive technical tasks during the software development process. Jenkins can provide you with many plugins to support building, deploying and automating any project.
Jenkins can be installed on Windows, macOS and on most of the Unix-like operating systems, such as Ubuntu. Let’s get started with installing this useful piece of software.
In this tutorial, we will cover the steps needed for installing Docker on Ubuntu 18.04.
Docker is mainly a software development platform and a kind of virtualization technology that makes it easy to develop and deploy apps inside of neatly packaged virtual containerized environments. Docker containers can be deployed to any machine without any compatibility issues, so the software stays system agnostic, simpler to use, less work to develop and easy to maintain and deploy.
Docker is a form of virtualization but, unlike a Virtual Machine, the resources are shared directly with the host. Let’s begin with the installation.
In this article, we will show you how to install the Shopware Community Edition (CE) on CentOS 7 server.
Shopware is an e-commerce platform written in PHP and is used for running online businesses and selling products and services online. This application is very easy to install and set up and does not require any sort of coding knowledge. Shopware CE is free and open-source, and has a user-friendly interface that allows for the use of drag and drop throughout the eCommerce platform. Let’s begin with the install process.
In this article, we will show you how to install Apache Cassandra on Ubuntu 18.04.
Apache Cassandra is an open-source NoSQL database manager which offers high availability and scalability by providing fault-tolerant multi-level cloud setup. It is useful for applications that will require a lot of data with redundancy but without compromising performance and security. There are several advantages that we’ll go over down below. Let’s begin with the installation.
In this tutorial, we will guide you through the steps of installing Dotclear on a CentOS 7 server, with Apache web server, PHP and MySQL.
Dotclear is a free and open-source PHP-based web publishing platform. This software allows you to spread your words to the internet easily with an intuitive user-interface and an extensive feature set. It is very fast, stable, and easy to use. The installation is pretty simple and straightforward.
The role of permissions and files is much clearer in Linux when compared to Windows. Most people find it easier to understand compared to the complex system of groups and users that we find in Windows’ concept of permissions. For example, each file in a Linux-based operating system has three sets of permissions – the first being the permissions of the owner, the second being for a specific group of users, and the last group’s permissions are responsible for the rest of the system.
The levels of access to reading, writing, and executing are then described with a scale, ranging from 1 to 7. A value of ‘1’ allows for execution of the file, ‘2’ allows writing access, and ‘4’ allows the file to be read. To combine several permissions, you just add the numbers together. For example, if you want read and write access for a file, but no access to executing this file, the value to set for permissions would be 2 + 4, which is 6.
In this tutorial, we’ll see how to create a file in such a way that only the owner has full permissions over it. We’ll also see what happens when another user tries to read or modify that file. Finally, we’ll look at the role of “sudo” users who take on the root role for themselves, and how we can implement ironclad file security by hiding contents even from root if necessary.
Creating a File with “Owner Only” Permissions
Let’s say we have a file whose contents we want to have hidden from everyone else. In essence, others would be able to see that the file exists, and that’s about it. We don’t want them to see what’s inside it, or be able to modify it in any way. We do this using the following command:
chmod 700 test.txt
Where test.txt is the name of the file that I want to protect. Once we run this command, the file turns “green” when you list it in a command like “ls”, and it displays the new file permissions with the “ls -l” command, like this:
Here, you can see the file permissions are restricted only to the first group – the owner – who has “rwx”, or read, write, and execute permissions. And the third column of “ls -l” is the owner name, which in this case is “root”.
For convenience sake, we’ve created this file in the home directory of another user called “testuser”. Here’s what happens when we log in as the new user and try and read the contents of test.txt:
As you can see, testuser is denied the ability to access the file in any way. Any other user who tries to open this file will get the same error message. In this way, you can ensure that your important files are kept hidden from other users.
Allowing Others to ONLY Read the File
Perhaps there’s an important document or set of rules that you want others to be able to read, but not modify. We can achieve this using the following command:
chmod 744 test.txt
Here, “744” instead of “700” gives everyone else the permission to read the file, but nothing else. Here you can see that “testuser” is able to access the contents of the file after it has been assigned its “744” permissions:
However, if they then try and modify the file using a file editor, like “vi”, they get the warning you expect as shown here:
Use this variant of the chmod command when you need others to see the file, but not modify it in any way.
Root or “Sudo” Users Still Have Access
Unfortunately, file permissions don’t apply to root or sudo users. For this example, I’ve added “testuser” to the sudoers file so they can use execute root commands using sudo. And when they do this, they can access the protected file as shown here:
There’s no way around this using file permissions. Root, and users belonging to the “wheel” group can simply use “sudo” to get around these restrictions. Of course, it’s good practice to be wise with the capabilities you give your users – handing out sudo permissions to everyone is not a good idea. Since this is common practice, well-configured Linux systems shouldn’t have this problem.
True File Security – Even from Root
Ultimately, the only way to hide your files from everyone – including root users – is to use passphrase-based encryption. No other method can hide your information with 100% security from everyone, including the root and sudo users!
Of course, you don’t have to do any of this if you use one of our Outsourced Server Support Services, in which case you can simply ask our expert Linux admins to set up your file permissions for you. Just sit back, relax, and let our admins take care of the issue for you. They are available 24×7 to help you with your requests.
PS. If you liked this post on denying file permissions to everyone except yourself, please share it with your friends on the social networks by using the share shortcut buttons, or simply leave a comment in the comments section below. Thanks.