chmod command gives access mode for users.Each time no need to go that folder directories and right click the folder and changing the permisson.just Go to the command prompt window and give the command chmod.
chmod who=permissionmode directory or folder or file
This gives “who” the specified permissionmode for a given filename.
"who" list of representation of three different roles:
List of some useful chmod by numbers
-R is noting but recursive
Example To Form Numbers use of Numeric Codes:
400+040+004+200+100+010+001 = 755 this represents (-rwxr-xr-x).
chmod -R 777 test.html means giving full access to the .html file
or you can give permission like this also
chmod u+x test.html which gives execute permission for user.
Like wise you can give multiple permission also.
chmod who=permissionmode directory or folder or file
This gives “who” the specified permissionmode for a given filename.
"who" list of representation of three different roles:
- u is for user,
- g is for group,
- and o is for others.
"permissionmode" is list of representation of three different permissions:
- r is for read permission,
- w is for write permission,
- x is for execute permission.
- 400 read by owner
- 040 read by group
- 004 read by anybody (other)
- 200 write by owner
- 020 write by group
- 002 write by anybody
- 100 execute by owner
- 010 execute by group
- 001 execute by anybody
List of some useful chmod by numbers
- chmod -R 777 ---->full access to everyone
- chmod -R 666 ---->read and write permission to everyone
- chmod -R 755 ----> Anyone write to the file
- chmod -R 644 ----> Read and write by owner and read by every one else
-R is noting but recursive
Example To Form Numbers use of Numeric Codes:
400+040+004+200+100+010+001 = 755 this represents (-rwxr-xr-x).
chmod -R 777 test.html means giving full access to the .html file
or you can give permission like this also
chmod u+x test.html which gives execute permission for user.
Like wise you can give multiple permission also.
No comments:
Post a Comment