Search Results for: linux directory structure

What is Docker-Compose and How to run multiple containers as a single service?

  Docker is an open platform for developers and sysadmins to build, ship, and run distributed applications, whether on laptops, data center VMs, or the cloud. To know about Docker in details, click here. The installation and configuration process is described in our different blog. Click here to access that. Here at linuxnix.com, we have a list of activities to be performed in this Docker series. With these tasks, we will be getting a clear picture on day-to-day docker use and the real-time scenarios we face where we need Docker the most. The lists of the activities are mentioned below: Dockerize a 2-Tier Java application by creating a Docker Image. Push the same Docker Image to Docker Hub. Run a container based version of the Application Database using the Docker-Compose file. Ensure data persistence by mounting the data outside of the containers. In this section, we are going to start the third task. To go through the second task, click here. Running an Application with Database via Docker-Compose In the previous blogs, we took a Java project, created a Dockerfile. Built the image using the Dockerfile, created the container, ran it and verified the running application on the port specified. We took the same image and pushed it to the Docker Hub. In this section, we are going to run a database version of this application and run both the container simultaneously via docker-compose. Docker-Compose...

Read More

Disable Delete Permission For Specific User using vSFTPd server

Introduction Data security and data integrity are critical for the successful functioning of any enterprise infrastructure. Setting up file servers to transfer files via FTP & SFTP is common practice. Some files being transferred and shared using FTP servers could have very important information like customer and billing data. Accidental deletion of such files could cause a major problem for the system administrator. If the passwords for the accounts being used to access these files get leaked and someone purposefully deletes the files then this could also cause a major issue. In one of our previous articles, we demonstrated how to configure chrooted sftp user accounts wherein the user was not permitted to access any folder outside the realm of it’s own home directory. This is a secure setup and is frequently implemented in organizations across the globe. In this article, we’ll shift our focus back to ftp and show you step by step how you could prevent specific users from deleting any files they might have access to. Step 1: Add the test user For the purpose of this demonstration we’ll be working on a Centos 6.8 system and will use a user account named nixuser to test our setup. So, first we’ll add this user. [root@linuxnix ~]# useradd -s /bin/false nixuser [root@linuxnix ~]# passwd nixuser Changing password for user nixuser. New password: BAD PASSWORD: it is WAY...

Read More

6 GIT diff command examples

Introduction to git diff command In our last article on working with the git distributed version control system, we explained how to use the git log command to track changes and updates made to our git repository. In this article, we will see how we could check what changes were made to the files or more precisely the differences between the committed or saved versions of a file in the repository. For viewing the actual differences between the different versions of a record, we will use the git log command and the git diff command. To understand the differences between the current state of the file in the repository compared to their last known state, we use the git diff command. A git diff command can be useful for comparing Show local changes Show difference between stagged and remote repo Show difference between two commits Show difference between two files Show difference between two branches Show difference between two tags Example 1: View difference between the last commit and current version of a file Continuing to use the git repository at location /home/sahil/git/my_first_repo, I’ve now added a line to the file test.txt in this repository. [sahil@linuxnix my_first_repo]$ cat test.txt This is a test file! Added another line to test file [sahil@linuxnix my_first_repo]$ echo "Adding a third line to test file" >> test.txt [sahil@linuxnix my_first_repo]$ cat test.txt This is a test file!...

Read More

Over 16,000 readers, Get fresh content from “The Linux juggernaut”

Email Subscribe

ABOUT ME..!

My photo
My name is Surendra Kumar Anne. I hail from Vijayawada which is cultural capital of south Indian state of Andhra Pradesh. I am a Linux evangelist who believes in Hard work, A down to earth person, Likes to share knowledge with others, Loves dogs, Likes photography. At present I work at Bank of America as Sr. Analyst Systems and Administration. You can contact me at surendra (@) linuxnix dot com.