File Permission | Basic Command in Linux | Devops Basic Part-8 | Techie Ansh
@Techie Ansh #Subscibe #DevopsCourse #FilePermission
Please Subscribe : https://bit.ly/techieansh
Please Join us to Reach 1K Subs.
In this Session we will learn about some basic command with example:
-------------------
==================================
Checkout My Playlist for more:-
Ansible Course in Hindi
----------------------------
https://www.youtube.com/playlist?list=PLmNmekbKZkr154DFvGshI3N8SlrgsDFQs
AWS Course 2022 in Hindi
------------------------
https://www.youtube.com/playlist?list=PLmNmekbKZkr0r1ujU5TmmzlONpt2ElJeq
Linux Course in Hindi
----------------------
https://www.youtube.com/playlist?list=PLmNmekbKZkr3ArxGUwQLpSYFT6jDcdtwq
Docker Traning in Hindi
--------------------------
https://www.youtube.com/playlist?list=PLmNmekbKZkr01Fhlq7riXTkAgTHixA-hR
--------------------------------
Linux File Permissions
The basic Linux permissions model works by associating each system file with an owner and a group and assigning permission access rights for three different classes of users:
The file owner.
The group members.
Others (everybody else).
File ownership can be changed using the chown and chgrp commands.
Three file permissions types apply to each class of users:
The read permission.
The write permission.
The execute permission.
To view the file permissions, use the ls command:
ls -l file_name
Changing File permissions-:
The File permissions can be changed using the chmod command. Only root, the file owner, or user with sudo privileges can change the permissions of a file. Be extra careful when using chmod, especially when recursively changing the permissions. The command can accept one or more files and/or directories separated by space as arguments.
Permissions can be specified using a symbolic mode, numeric mode, or a reference file.
Symbolic (Text) Method
The syntax of the chmod command when using the symbolic mode has the following format:
chmod [OPTIONS] [ugoa…][-+=]perms…[,…] FILE...
The first set of flags ([ugoa…]), users flags, defines the users’ classes for which the permissions to the file are changed.
u - The file owner.
g - The users who are members of the group.
o - All other users.
a - All users, identical to ugo.
When the users’ flag is omitted, it defaults to a.
- - Removes the specified permissions.
+ - Adds specified permissions.
= - Changes the current permissions to the specified permissions. If no permissions are given after the = symbol, all permissions from the specified user class are removed.
The second set of flags ([-+=]), the operation flags, defines whether the permissions are to be removed, added, or set:
Here are some examples of how to use the chmod command in symbolic mode:
Give the members of the group permission to execute the file, but not to read and write to it:
chmod g=x filename
Remove the write permission for all users:
chmod a-w filename
Recursively remove the execute permission for other users:
chmod -R o-x dirname
Remove the read, write, and execute permission for all users except the file’s owner:
chmod og-rwx filename
The same thing can also be accomplished by using the following form:
chmod og= filename
Give read, write and execute permission to the file’s owner, read permissions to the file’s group, and no permissions to all other users:
chmod u=rwx,g=r,o= filename
Numeric Method:-
r (read) = 4
w (write) = 2
x (execute) = 1
no permissions = 0
Owner: rwx=4+2+1=7
Group: r-x=4+0+1=5
Others: r-x=4+0+0=4
To set up the setuid, setgid, and sticky bit flags, use four digits number.
When the 4 digits number is used, the first digit has the following meaning:
setuid=4
setgid=2
sticky=1
no changes = 0
The next three digits have the same meaning as when using 3 digits number.
If the first digit is 0 it can be omitted, and the mode can be represented with 3 digits. The numeric mode 0755 is the same as 755.
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «File Permission | Basic Command in Linux | Devops Basic Part-8 | Techie Ansh», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.