To change directory permissions in Linux, use the following:

chmod +rwx filename to add permissions
chmod -rwx directoryname to remove permissions.
chmod +x filename to allow executable permissions.
chmod -wx filename to take out write and executable permissions.

Note that “r” is for read, “w” is for write, and “x” is for execute.

Permission numbers are:

0 = —
1 = –x
2 = -w-
3 = -wx
4 = r-
5 = r-x
6 = rw-
7 = rwx

For example:

chmod 777 foldername will give read, write, and execute permissions for everyone.
chmod 700 foldername will give read, write, and execute permissions for the user only.

Another helpful command is changing ownerships of files and directories in Linux:

chown name filename
chown name foldername

These commands will give ownership to someone, but all sub files and directories still belong to the original owner.

One response to “How to Change Directory Permissions in Linux — DevOps Guide”

  1. a complete and well-directed dose of knowledge for DevOps beginners Avatar
    a complete and well-directed dose of knowledge for DevOps beginners

    I thing this is complete Dose for begineers to learn Devopps with right direction

    Liked by 1 person

Leave a comment

Hi, I’m Banesingh Pachlaniya

BE, M.Tech || DevOps Engineer || Cloud Architect

With over 9 years of experience, I specialize in architecting and managing scalable, secure, and highly available cloud infrastructure on AWS. I’m passionate about building automation-first systems using tools like Terraform, Ansible, Docker, and Kubernetes.

At DevOps Dose, I share hands-on insights, real-world project guides, and simplified tutorials to help you master DevOps the practical way — whether you’re just starting out or scaling up your skills.

Let’s connect