Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedsami76 committed Aug 10, 2023
1 parent a7bf4c9 commit d35bc45
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion linux.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1530,7 +1530,48 @@
{
"cell_type": "markdown",
"metadata": {},
"source": []
"source": [
"**Managing permissions using `chmod`** \n",
"`$ chmod u=<rwx>,g=<rwx>,o=<rwx> <filename>`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"`$ chmod u=rw,g=rw,o=r somefile`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"```\n",
"$ touch file2\n",
"$ ls -l file2\n",
"$ sudo chmod u=r,g=rwx,o=r file2\n",
"$ ls -l file2\n",
"```"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Use + and - to toggle on or off specific permissions \n",
"`$ sudo chmod g-w file2` -- removes the write permission from the group on the file \n",
"`$ ls -l file2`"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Change Permissions Numerically** \n",
"`$ touch file3` \n",
"`$ ls -l file3` \n",
"`$ chmod 660 file3`"
]
},
{
"cell_type": "markdown",
Expand Down

0 comments on commit d35bc45

Please sign in to comment.