Calculate chmod permissions and subnet ranges: a DevOps quick reference
File permissions and network subnetting are constant tasks for DevOps engineers and sysadmins, yet the conversions remain easy to miscalculate. Chmod notation switches between human-readable (rwx) and octal (755) in ways that trip up even experienced operators; subnet math is similarly error-prone when you are working from memory. This guide shows how to translate permissions and IP ranges confidently, with tooling that keeps your work local and available offline.
Understanding chmod permission bits
Every Unix file carries three permission sets: owner (user), group, and others. Each set has three permissions: read (r), write (w), and execute (x). The chmod command accepts octal notation, where each digit represents one permission set and its value is calculated by adding the permissions within it.
Read is worth 4, write is 2, and execute is 1. Add them to get the digit for each set. Owner with rwx is 7 (4+2+1); group with r-x is 5 (4+1); others with r-- is 4. That gives chmod 754. Use the chmod calculator to avoid arithmetic errors when you are setting permissions on critical files or directories.
Common chmod patterns and why they matter
The most common permission you will encounter is 755: owner has full control, group and others can read and execute. This is standard for executable scripts and web application directories. Another frequent one is 644 (owner reads and writes, group and others read only), used for configuration files and documentation. For sensitive files like SSH keys or database credentials, 600 restricts read and write to the owner alone.
Getting these wrong stops deployments cold or introduces security holes. A script with 644 will not run even if the owner executes it; a key file with 644 is rejected outright by SSH. Verify your permission notation before deployment, especially in infrastructure-as-code workflows where a mistake propagates across your entire cluster.
IP addressing and CIDR notation
Network engineers describe IP ranges using CIDR notation: an IP address followed by a slash and a prefix length, like 192.168.1.0/24. The number after the slash is the number of bits reserved for the network portion of the address. A /24 network reserves the first 24 bits, leaving 8 bits for host addresses—that is 256 total addresses (though two are reserved for network and broadcast). Understanding this arithmetic is essential for subnet planning and firewall rules.
The relationship between prefix length and subnet mask is fixed. A /24 prefix is equivalent to the mask 255.255.255.0. A /16 is 255.255.0.0. A /32 is a single host. Use the IP subnet calculator to derive the range of usable host addresses, the broadcast address, and the network size for any CIDR notation—all without reaching for a reference table.
Converting between IP notations
You will encounter IP addresses in different formats. Dotted decimal (192.168.1.1) is standard, but applications sometimes use binary, hexadecimal, or integer representations. Switching between them is arithmetic but tedious to do by hand, and mistakes are silent—you end up connecting to the wrong host or allowing traffic through the wrong firewall rule.
The IP converter handles dotted decimal, binary, hex, and integer formats instantly. Keep it bookmarked if you work with API responses that return IP addresses in unexpected formats, or if you need to cross-check addresses between documentation systems.
MAC addresses and interface identification
Physical network interfaces are identified by MAC addresses: 48-bit identifiers written in hex with colons or hyphens, like aa:bb:cc:dd:ee:ff. The first half identifies the vendor (OUI), the second half identifies the device. For DHCP reservations, network access control, and interface-level monitoring, you need the exact MAC address of the device.
The MAC address generator creates valid addresses for testing and virtual machines. If you are simulating a network or setting up automated tests, use it to generate consistent addresses without worrying about vendor prefixes or formatting.
Combining chmod and network configuration
In practice, these calculations often happen together. You provision a host, assign it an IP in a known subnet, generate a config file with the right permissions, and deploy. Mistakes at either step break the whole chain. A permission-denied error on a script looks the same as a network timeout until you dig deeper.
Work through both calculations before deploying: verify your chmod values, confirm your subnet assignments, and test locally if possible. The time spent double-checking prevents hours of debugging in production.
Keep your work private and offline
All of these tools run entirely in your browser—no uploads to the server, no account required, no dependency on network connectivity. Your permissions, subnets, and addresses never leave your machine. Once you have loaded TextArray, every calculator and converter works even if you are offline, making them reliable companions for work on secure networks, air-gapped systems, and environments where you cannot reach external services.
Whether you are setting file permissions on a production server, planning a network migration, or testing infrastructure automation, having these conversions available locally means faster decisions and fewer context switches to lookup tables or external calculators.