What is acl in Linux?
ANSWER
Access
Control List (ACL) in linux is a model that lets you specify permissions to
file. It is an object associated with a file that contains entries specifying
the access that individual users or group of users have to file. That is,
Access List allows you to give or deny permission from a user or group of users
to a file.
Normally,
it is not possible to set permissions for individual users on the same file.
But with Access List, it is possible. The owner of file can set different
permissions on a single file for different users. For instance, user A may be
able to read and modify a file while user B may just
have permission to read and not to
modify.
The “chmod” is the main command used in
Access List to grant or deny access to a file.
What is Apache Server?
ANSWER
Apache server is the world’s most used/popular
linux-based web server application. Though it is commonly used on a Unix-like
system (usually GNU/Linux), the software is available for a wide variety of
operating systems. It supports features like server-side programming language
and authentication schemes. It provides a variety of MultiProcessing Modules
(MPMs), which allow Apache to run in a process-based, hybrid (process and
thread) or event-hybrid mode, to better match the demands of each particular
infrastructure. The design of Apache is to reduce latency and increase
throughput, handle more requests and provide reliable and consistent handling
of requests within a reasonable period of time. It supports digital certificate
authentication and password authentication. It includes
popular authentication modules like mod_access, mod_digest, and
mod_auth_digest, the successor etc.
QUESTION
What is root:x:0:0:root:/root:/bin/bash present in /etc/passwd
ANSWER
The first root:here is the account usernamefield.According to the man page of useradd command,
"Usernames may only be up to 32 characters long". This username must
be used at the time of logging in to the system.
The x: is the placeholder for password
information. The password is obtained from “/etc/shadow”file.
It denotes that the password is encrypted and saved in the /etc/shadow file.
0:This isuser ID field.
Each user has a unique ID that identifies them on the system. Any account
created is assigned a user ID. The root user is always identified by user ID 0.
The second 0: This isthe group ID. Each group has
a unique ID. This field specifies which group the user belongs to. Each user
has aprimary group that is used as group by default. The root group ID is
always set to 0.
The second
root:represents the comment field.
This field can be used to user’s function. It is used to provide short
comment/description/information of the user account. It can be the contact information for the user to describe
the service the account was made for.
/root:represents the home directory. For
root users, it is /root but for
regular users, it is “/home/username.
/bin/bash: This is the user shell field. The field
contains the field that will be spawned or the command that will be run when
the user logs in.
The /etc/passwd file is one of the most
important files as it possesses all the necessary details about every account
in the Linux system. It
maintains the information about each and every user that can use the system.
Every time a new user account is created, the user account details are stored
in the same file. Whenever some user attempts for a login to the system, the
getty process validates the user, whether the user is legitimate or not, using
/etc/passwd.
Umask value and permission and special type of
permission
ANSWER
Umask (User file creation MASK or User mask)
is a default permission given to any file created in Linux machine. In other
words, it is a permission given to a newly created file and folders in Linux.
These permissions are stored as group of bits represented in numbers/codes or
by binary, octal or other symbols. For example, in most Linux distributions
(Distros), UMASK is set as 0022 by default. The minimum and maximum UMASK value
for a file is 000 and 666 respectively while the minimum and maximum for folder
is 000 and 777. Symbols such as “rx, wrx and r” are used as well.
The
different symbolic representations of permissions are as follows:
1- Represents Read and Write
permissions
2- Represents Read and Execute
permissions
3- Represents Read only permission
4- Represents Write and Execute
permissions
5- Represents Write only permission
6- Represents Execute only permission
7- Represents No permissions
To change
the default permission of a file, subtract the permission number from 666. Then
the remainder is to be used as umask value. Eg If the permission you want is
644 (x-wx-wx), minus 644 from 666. The difference which is 622 (x-rx-rx) should
be used.
r- Represents Read Permission
w-Represents Write Permission
x- Represents Execute Permission
rx- Represents Read and Execute permissions
rw- Represents Read and Write
permissions
wrx- Read, Write and Execute permissions
o
The Read permission allows a user to only read
the files, view the folders, sub-folders and permissions, but cannot edit or
change the content of the folder.
o
The Write permission allows
the user to read attributes and even create sub-folders and files.
o
The Execute permission allows a user to run a file or
application.
o
The Read-Write-Execute command allows a user to perform a
read-write-execute operation on the file.
o
The Read-Execute command allows a user perform a read-execute
operation on a file.
o
The Read-Write command allows a user to perform a read
write operation on the file.
ConversionConversion EmoticonEmoticon