
Learn how to view and modify permissions for hidden files and system files.
Hidden files (those starting with .) have permissions too, but ls -l won't show them by default.
Revealing Hidden File Permissions:
# Show permissions for all files, including hidden ones
ls -la
# Show permissions for a specific hidden file
ls -l .bashrc
Common Hidden Files You'll Encounter:
.bashrc - Your shell configuration.ssh/ - SSH keys and config.gitconfig - configuration.vimrc - Vim editor settingsTypical Hidden File Permissions:
-rw------- .ssh/id_rsa # Private key: owner only
-rw-r--r-- .bashrc # Config: owner write, others read
drwx------ .ssh/ # SSH directory: owner only
Security Note: Hidden files often contain sensitive configuration or private keys. They typically have restrictive permissions (600 or 700) to prevent unauthorized access.
Modifying Hidden File Permissions:
Save
# Make .bashrc readable by group
chmod 640 .bashrc
# Secure SSH private key (very important!)
chmod 600 ~/.ssh/id_rsa
Remember: Hidden files follow the same permission rules as regular files - they're just not displayed by default.