Linux File Permissions Tutorial

Verified

Added on  2020/03/01

|15
|1930
|182
AI Summary
This Linux assignment focuses on understanding and applying file permissions using the `chmod` command. It starts by outlining different permission levels (read, write, execute) for owners, groups, and others. The example scenario involves setting permissions for a directory (`test_dir`) where the owner can read and write, while others can only list files within it. The assignment demonstrates the use of `chmod 644` to achieve this specific permission structure.

Contribute Materials

Your contribution can guide someone’s learning journey. Share your documents today.
Document Page
PART-2 : 1
There are various Linux versions, which can serve the purpose of DNS server. Today, the world
popularly consider Ubuntu Linux, as a best option to help the web based applications. It is the
fact that, the web based applications require DNS server, as a crucial part. The DNS server
Ubuntu Linux 16 can be suggested as the appropriate solution. BIND is a part of Ubuntu, which
is available both internally and externally in the DNS server. It is stated that, in the small LAN
network, the DNS server could easily support more than 4000 DNS entries. On the other hand, in
WAN it can help more than 400000 entries. There are possibilities that the DNS server's entries
can be higher, if the hardware capacity of the server is high. Once the VMware work station is
installed, it creates raw virtual server which has the capacity of 4 GB RAM and approximately
100 GB of disc space. In less quantity there will virtual server simulation from the HP C7000
blade server. If the Ubuntu server 16 is already downloaded, then it will already contain the
bootable Ubuntu Server 16 DVD. It is enough to have 4.7 GB DVD, for preparing the bootable
Ubuntu Linux server’s DVD. At present, Ubuntu 14.04 LTS is the new version and it will be
supported till 2021. UEFI firmware is available in the hardware that already has installed the
VMWare virtual servers. Then download the server OS of x64 version. Further, it is necessary to
change the virtual server’s booting option so that it can boot from the CD. Once the option for
install Ubuntu is selected, the process of installing Ubuntu Server LTS 16.04 starts. It is
recommended to opt English language during installation. Ensure internet connection and
provide automatically update option. Next, the installation successfully completes, where the
virtual server is ready to use with the Ubuntu server 14.04 LTS.
Setup Ubuntu server (BarCharts and BarCharts Inc, 2008)
1

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Logged out and logged into the server again
2
Document Page
Created new user assign2
3
Document Page
Logged out and logged into the server as assign2
4

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
Installed DNS Server. Studied about the DNS Server and its functioning from the RHCE books
and other university notes. Studied about the Linux commands and practiced most of them to do
the work (Chadwick, 2017) (Linux-tutorial.info, 2017) (www.javatpoint.com, 2017).
5
Document Page
6
Document Page
assign2@assign2server:~# apt-get install bind9
Reading package lists... Done
Building dependency tree
Reading state information... Done
bind9 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 202 not upgraded.
assign2@assign2server:~# apt-get install dnsutil
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dnsutil
assign2@assign2server:~# apt-get install dnsutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
dnsutils is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 202 not upgraded.
assign2@assign2server:~# apt-get install bind9-doc
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
bind9-doc
0 upgraded, 1 newly installed, 0 to remove and 202 not upgraded.
7

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
Need to get 182 kB of archives.
After this operation, 1,396 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main bind9-doc all 1:9.9.5.dfsg-
3ubuntu0.8 [182 kB]
Fetched 182 kB in 0s (363 kB/s)
Selecting previously unselected package bind9-doc.
(Reading database ... 54464 files and directories currently installed.)
Preparing to unpack .../bind9-doc_1%3a9.9.5.dfsg-3ubuntu0.8_all.deb ...
Unpacking bind9-doc (1:9.9.5.dfsg-3ubuntu0.8) ...
Setting up bind9-doc (1:9.9.5.dfsg-3ubuntu0.8) ...
assign2@assign2server:~#
DNS Server - Basic Configuration
Studied about the DNS Server and its functioning from the RHCE books and other university
notes. Studied about the Linux commands and practiced most of them to do the work (Love,
2013) (Ray and Ray, 2007) (Linux.com | The source for Linux information, 2017).
Used assign2 credentials to login to the linux server.
Selected hostname as “mylinux” while installing. Hostname changed to “assign2server”
hostname is the command used for this purpose.
Fully Qualified Domain Name : assign2server.itc514.edu is assumed.
8
Document Page
Installed DNS utilities bind9 documentation
Studied about the DNS Server and its functioning from the RHCE books and other university
notes. Studied about the Linux commands and practiced most of them to do the work.
sudo apt-get install dnsutils bind9-doc
Primary master Setup
Studied about the DNS Server and its functioning from the RHCE books and other university
notes. Studied about the Linux commands and practiced most of them to do the work
(Ee.surrey.ac.uk, 2017) (Ee.surrey.ac.uk, 2017).
Backed up the existing DNS records and the domain details. New Domain and DNS
specifications.
New Domain Name: itc514.edu
FQDN of the server assign2server.itc514.edu
FQDN of the Client assign2client.itc514.edu
DNS Server IP: 192.168.10.100
Forward Lookup Zone Setup
zone " itc514.edu" {
type master;
9
Document Page
file "/etc./bind/db.itc514.edu";
};
Reverse zone file Setup
Studied about the DNS Server and its functioning from the RHCE books and other university
notes. Studied about the Linux commands and practiced most of them to do the work.
zone "10.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.192";
};
Restarted the service.
sudo service bind9 restart
MAJOR TASKS IN THE ASSIGNMENT
Studied about the DNS Server and its functioning from the RHCE books and other university
notes. Studied about the Linux commands and practiced most of them to do the work.
Created domain in itc514.edu.local file
#vi /etc/bind/itc514.edu.local
//Forward zone
Zone “assign2server.itc514.edu”{
type master;
10

Secure Best Marks with AI Grader

Need help grading? Try our AI Grader for instant feedback on your assignments.
Document Page
file “/etc/bind/itc514.edu.local
//reverse zone
zone “10.168.192.in-addr.arpa”{
type master;
file “/etc/bind/db.10”;
};
Made forward and reverse entries as asked
# vi /etc/bind/db.itc514.edu
host1 IN A 192.168.10.5
host2 IN A 192.168.10.6
host3 IN A 192.168.10.7
www IN CNAME host1
srv_file IN CNAME host2
# vi /etc/bind/db.1
5 IN PTR host1
6 IN PTR host2
7 IN PTR host3
DNS Server Testing
Studied about the DNS Server and its functioning from the RHCE books and other university
notes. Studied about the Linux commands and practiced most of them to do the work.
Used nslookup commands and checked all the hosts and found all the hosts are showing the correct
domain name as well as Ips.
11
Document Page
#nsloookup 192.168.10.6
host2
#nslookup host3
192.168.10.7
Problems faced in Linux based DNS servers
Studied about the DNS Server and its functioning from the RHCE books and other university
notes. Studied about the Linux commands and practiced most of them to do the work.
Setup physical server. It took more than 1 hour to install.
Installed ubuntu linux in VM and it went fast. Took less then 30 minutes.
Network setting in ubuntu server VM is difficult.
Unix commands are not easy. Referred a book in hand in executing commands.
Setting up LAMP server is a difficult task. LAMP is using BIND
Could not use command without SUDO
PART-2
2) Create a user "assgn2' and in their home directory create the files with the following permission
Already did this work.
a) Answer is below:
myserver@assign2server # sudo useradd assgn2
12
Document Page
assign2@assign2server : /home/assign2# touch processes.txt
assign2@assign2server : /home/assign2# cat > processes.txt
ps aux | less
assign2@assign2server : /home/assign2#
assign2@assign2server : /home/assign2server# ls –l processes.txt
-rw-r—r-- 1 assign2 assign2 3049 2017-08-24 02:50 test1
assign2@assign2server : /home/assign2server# chmod g+w processes.txt
assign2@assign2server : /home/assign2server# chmod o+w processes.txt
assign2@assign2server : /home/assign2server# ls –l processes.txt
-rw-rw-rw- 1 assign2 assign2 3049 2017-08-24 02:50 test1
b) Answer –
Used the following commands
Chmod g+rx script1.sh
chmod o+rx script1.sh
chmod u+x script1.sh
used the following commands
touch .test_config.sh
ls –l .test_config.sh
chmod u+x .test_config.sh
13

Paraphrase This Document

Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser
Document Page
ln –s /var/log/syslog /assign2/seethelogs
mkdir test_dir
chmod 777
assign2@ assign2server:~# mkdir test_dir
# ls -ld test_dir
drwxr-xr-x 2 assign2 assign2 4096 Aug 25 12:41 test_dir
:~#
Remaining Permissions Settings , Changing permissions are given below
assign2@ assign2server:/# ls
Test Directory Permissions checked
assign2@assign2server:~# ls -ltr
total 14880
-- 1 assign2 assign2 15220142 Aug 9 02:12 webmin_1.810_all.deb
Ownercan Read and write , Others can only list
assign2@assign2server:~# chmod 644 test_dir/
assign2@server:~# ls
Downloads ehcp test_dir vst_install_backups webmin_1.810_all.deb
Checking the permissions
assign2@assign2server:~# ls -ltr
14
Document Page
References
BarCharts, I. and BarCharts Inc, S. (2008). Linux. Boca Raton: BarCharts, Inc.
Chadwick, R. (2017). Linux Tutorial - Learn the Bash Command Line. [online]
Ryanstutorials.net. Available at: https://ryanstutorials.net/linuxtutorial/ [Accessed 25
Aug. 2017].
Debian.org. (2017). Chapter 1. GNU/Linux tutorials. [online] Available at:
https://www.debian.org/doc/manuals/debian-reference/ch01.en.html [Accessed 25
Aug. 2017].
Ee.surrey.ac.uk. (2017). UNIX / Linux Tutorial for Beginners. [online] Available at:
http://www.ee.surrey.ac.uk/Teaching/Unix/ [Accessed 25 Aug. 2017].
Guru99.com. (2017). Cite a Website - Cite This For Me. [online] Available at:
https://www.guru99.com/unix-linux-tutorial.html [Accessed 25 Aug. 2017].
Isc.org. (2017). BIND Open Source DNS Server | Internet Systems Consortium.
[online] Available at: https://www.isc.org/downloads/bind/ [Accessed 25 Aug. 2017].
Linux.com | The source for Linux information. (2017). The Complete Beginner's
Guide to Linux. [online] Available at: https://www.linux.com/learn/complete-
beginners-guide-linux%20 [Accessed 25 Aug. 2017].
Linux-tutorial.info. (2017). Linux Knowledge Base and Tutorial. [online] Available
at: http://www.linux-tutorial.info/ [Accessed 25 Aug. 2017].
Love, R. (2013). Linux system programming. Sebastopol, Calif: O'Reilly.
Petersen, R. (2007). Linux. Emeryville, USA: McGraw-Hill Professional Publishing.
Ray, D. and Ray, E. (2007). Unix. Berkeley, Calif.: Peachpit Press.
Ray, E. and Ray, D. (2004). Unix advanced. Berkeley, Calif.: Peachpit.
www.javatpoint.com. (2017). Linux Tutorial - javatpoint. [online] Available at:
https://www.javatpoint.com/linux-tutorial [Accessed 25 Aug. 2017].
www.tutorialspoint.com. (2017). Linux Tutorials. [online] Available at:
https://www.tutorialspoint.com/listtutorials/linux/1 [Accessed 25 Aug. 2017].
15
1 out of 15
circle_padding
hide_on_mobile
zoom_out_icon
[object Object]

Your All-in-One AI-Powered Toolkit for Academic Success.

Available 24*7 on WhatsApp / Email

[object Object]