RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

chmod

Article Index
1. Name
2. Synopsis
3. Frequently used options
4. Basics
5. Examples
5.1. Octal Mode
5.2. Symbolic Specification

1. Name

chmod [man page] - change file access permissions

2. Synopsis

chmod [OPTION]... MODE[,MODE]... FILE...
chmod [OPTION]... OCTAL-MODE FILE...
chmod [OPTION]... --reference=RFILE FILE...

3. Frequently used options

-R, --recursive
change files and directories recursively
-c, --changes
like verbose but report only when a change is made
-v, --verbose
output a diagnostic for every file processed

4. Basics

  • r : read (user can read the file, or list a given directory)
  • w : write (user can write to the file, or create file or directory in the directory)
  • x : execute (user can execute the file, or enter directory)
$ ls -ld dir/ 

show directory permitions
chmod octal and symbolic guide

5. Examples

5.1. Octal Mode

Let's see how we can change file.txt permissions to rwxr-xr-- with octal mode:

$ chmod 764 file.txt 

use octal chmod to change file permitions

5.2. Symbolic Specification

Symbolic specification is just another way to change file and directory permissions.  In the next example we will change file.txt's permissions to rwxr-xr-- with a following symbolic specification:

$ chmod u=rwx,g=rx,o=r file.txt 

use symbolic chmod to change file permitions

Share this linux post:

Submit chmod in Delicious Submit chmod in Digg Submit chmod in FaceBook Submit chmod in Google Bookmarks Submit chmod in Stumbleupon Submit chmod in Technorati Submit chmod in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download