The beginning of a Linux Story


Linux workshop day-4 conducted under the Guidance of Pranav Jambare covered up the following points
Sticky bit
Setting Sticky bit on the directory allow only file owner, directory owner and root user to rename or delete its files.
It is only applicable to directories and not to files
#Assigning the Stickybit the directory should have 777 permission chmod 777 <dirName> #Applying the sticky bit [root@ip-172-31-32-5 ec2-user]# chmod +t <dirName>
SUID
When the SUID bit on an executable file is set, it signifies that the file will be executed with the same permissions as the executable's owner.
SGID
The process will have the same group rights as the file being executed, just like SUID.
SSH
The Secure Shell Protocol (SSH) is a cryptographic network protocol that allows network services to be operated safely over an unsecured network.
SSH apps use a client-server architecture to connect an SSH client to an SSH server.
It uses port no 22
#installing required packages yum install openssh-server yum install openssh-client
Check whether the port is active for ssh connection
netstat -tunlp|grep 22
Check the status of the service
systemctl status sshd
Restart the service
systemctl restart ssh
Establishing connection between the Client and the server'
ssh <username>@<userIP>
Find and Locate
Find:
Find command is used to find files and folder and to perform operations on them.
The find command allows you to find files, folder, owner,permissions, etc.
Syntax: find <path> -<Searchoption> <filename>
Locate:
Locate command is used to find files by names.
It searches databases rather than file system.
Locate command is faster than find.
The database needs to be updated using the "updatedb" command.
Syntax:
#Update database
updatedb
#locate file
locate <fileName>
Subscribe to my newsletter
Read articles from Rihaab Wadekar directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
