DevOps/Cloud By GK
  • DevOps/Cloud Introduction
  • 🚩AWS
    • Create AWS Account
    • Launch EC2 Instance
  • 🚩Linux
    • User Managment
      • Adding the User to Sudo group
      • visudo
    • Directory / File Management
      • Vi
      • Changing Permissions (chmod)
      • Filtering IO/File
    • Memory Management
    • Process Management
    • Network Management
    • Service Management
    • Environmental Variables
      • $PATH
    • Utilities
    • SHELL PROGRAMMING
      • Hello World
      • Variables
      • Command Line arguments
      • Conditional Statements
      • Array
      • Loops
      • Functions
      • AWK
      • sed
      • Example Useful Scripts
      • Basic -> Advanced
  • 🚩git
    • Introduction
    • Creating GitHub Account
    • Installation
      • Git Bash In Windows
      • Git In VS Code
      • Git In Eclipse
      • Git CLI in Linux
  • Creating Git Remote Repository
  • Git Commands L -> R
  • Git Commands L <- R
  • Git Branch Commands
  • Using SSH (Password Less)
  • 🚩maven
    • Introduction
    • Installation
    • POM.xml
    • Goals
  • 🚩SonarQube
    • Introduction
    • Sonar Cloud
    • Creating Project In SonarCloud
    • Installing Sonar-Scanner
    • Triggering Scan
  • 🚩Nexus
    • Introduction
    • Installation of Nexus
    • Creating Repository
    • Uploading Artifacts to Repository
  • 🚩Jenkins
    • Introduction
    • Installation of Jenkins
    • First Job In Jenkins
    • Git + Jenkins
      • WebHook
    • Maven + Jenkins
    • Sonar-Scanner + Jenkins
    • Nexus + Jenkins
Powered by GitBook
On this page
  1. Linux
  2. Directory / File Management

Changing Permissions (chmod)

The "chmod" command is a Linux/Unix command used to change the permissions of files or directories. The command is short for "change mode". With "chmod", you can specify who can read, write, and execute a file or directory. Here's the basic syntax for the "chmod" command:

chmod [permissions] [filename/directory]

Symbolic notation:

chmod u+rwx file.txt    // add read, write, and execute permission for the owner
chmod g-w file.txt      // remove write permission for the group
chmod o=r file.txt      // set read permission for others

Numeric notation:

r=4, w=2, x=1

chmod 750 file.txt      // set read, write, and execute permission for the owner, read and execute permission for the group, and no permission for others
chmod 644 file.txt      // set read and write permission for the owner, and read-only permission for the group and others
chmod 777 file.txt      // set read, write, and execute permission for everyone (not recommended for security reasons)
PreviousViNextFiltering IO/File

Last updated 2 years ago

🚩