chmod

change permissions of a file

copy
234
111
chmod 777 myfile.txtSet read write and execute permissions on myfile.txt

details |

copy
88
21
chmod +r,-x,ug+w myfile.txtAdd read permission on all, remove execute on all, and set user/group to read write for file myfile.txt

details |

copy
47
9
chmod g= myfile.txtSet group permissions to nothing on myfile.txt

details |

copy
70
15
chmod o=r myfile.txtSet the permissions for others to read only on myfile.txt

details |

copy
62
18
chmod 4755 myfile.txtSet user id = 4, user to read write execute, and group/other to read execute

details |

copy
59
11
chmod ug+rw myfile.txtAdds the permission read write to user/group on myfile.txt

details |

copy
71
21
chmod 0664 myfile.txtChange the permissions to user(6):read write, group(6):read write, other(4): read on myfile.txt

details |

copy
47
10
chmod ug=rx myfile.txt Set user and group permissions to read execute on myfile.txt.

details |

copy
31
5
chmod a-rwx myfile.txt Removes all permissions on myfile.txt

details |

copy
40
7
chmod a+rwx myfile.txtAdds read write and execute premissions to all users/groups/others on myfile.txt

details |

copy
41
6
chmod og=rw myfile.txtChange the group and others permissions to read write on myfile.txt

details |

copy
14
0
chmod -R 700 ~/.sshMake the .ssh directory only accessible to $USER

6 years, 2 months ago john 0 | details |

copy
4
0
chmod +x script.shMake Script.sh executable

6 years, 2 months ago john 0 | details |