chmod (change access permission)


chmod (change access permission)
- Used to change access permission(or file mode) to an existing file or directory.
(Only file owners or super users are allowed to change the mode.)
- mode option is specified as a character symbol or octal number.

Options and Symbols
  • the user to be changed(user target), the command to be performed (operating), and the permission to be set (access)
  • Multiple option are separated using commas (,)

  • options
    • -R
      Change the permissions of subdirectories and files (recursive)
    • the user to be changed
      • u
        abbreviation for "user", meaning file or directory owner
        g
        group owner
        o
        abbreviation for "others", meaning other users
        a
        abbreviation for "all", a combination of u,g,o (estimated to be all if no characters are used)
    •  the command to be performed
      • +
        add
        -
        remove
        =
        specify (Existing properties disappear.)
    • the permission to be set
      • r
        read
        w
        write
        x
        execute

Examples of frequently used options
+x
Add execution permission to all users (owners, groups, and others)
u+x
Add execution Permission to Owner
u-x
Remove the owner's execution permission
o-rw
Remove other users' "read and write" permissions
go=rw
assign "read, write" permissions to  groups and other users(remove if they previously had execute permissions)
u+x,go=rw
Add execution rights to owner and assign "read and write" permissions to groups and other users
a=rw
Assign "read, write" permissions to all users
g-w
Remove "write" permissions for group owners
g+w,o-x
Add "write" permissions to group owners, remove "write" permissions from other users


#chmod #permission #permission deny #linux #linux permission

No comments:

Post a Comment

알뜰폰 삼성페이 교통카드 '한도 초과' 오류(등록 불가 오류) 해결방법

sk7mobile 알뜰폰 삼성페이 교통카드 등록 시, 한도 초과 문제 해결방법 skt usim 해킹 사건으로 인해 sk7mobile 알뜰폰을 사용하는 저도 usim을 바꾸고 나니 삼성페이 교통카드가 등록이 안되더라구요...  삼성페이 교통카드 기능 은...