User Tools

Site Tools


adding_and_removing_linux_permissions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
adding_and_removing_linux_permissions [2016/07/25 19:31] walkeradminadding_and_removing_linux_permissions [2023/03/09 22:35] (current) – external edit 127.0.0.1
Line 1: Line 1:
 ====== Adding and Removing Linux Permissions ====== ====== Adding and Removing Linux Permissions ======
 +<color darkorange>2016</color>
 +
 +----
 +
 \\  \\ 
 +**Granting Permissions** 
 \\  \\ 
 Grant the execute permission to the group. Grant the execute permission to the group.
 \\  \\ 
     ls -l example.py     ls -l example.py
-    --rw-r--r-- 1 pi pi 4452 Jul 25 18:01 example.py +    -rw-r--r-- 1 pi pi 4452 Jul 25 18:01 example.py 
-    chmod g+x example.py+    chmod g+x example.py --- g is for group, x is for execute
     ls -l example.py     ls -l example.py
 +    
 +    -rw-r-xr-- 1 pi pi 4452 Jul 25 18:01 example.py
 +
 +    The group rights have changed from ----r------ to ----r-x---  (only looking at group, not listed Owner or Other)
 \\  \\ 
  
 +\\ 
 +If required, more than one permission can be changed at once, for example I want to give write and execute to 'Other'
 +\\ 
 +    ls -l example.py
 +    -rw-r--r-- 1 pi pi 4452 Jul 25 18:01 example.py
 +    chmod o+wx example.py --- o is for owner, w is for write, x is for execute
 +    ls -l example.py
 +    
 +    -rw-r--rwx 1 pi pi 4452 Jul 25 18:01 example.py
  
-6.-rwxr-x--harry users 2.7K Jan 4 07:32 frog.png +    The Other rights have changed from --------r-- to -------rwx 
-7.user@bash:  +\\  
-8.user@bash: chmod u-w frog.png +\\  
-9.user@bash: ls -l frog.png +**Removing permissions**  
-10.-r-xr-x--harry users 2.7K Jan 4 07:32 frog.png +\\  
-11.user@bash: +This is the exact opposite, instead of using a + (plus) we use a - (minus) 
 +\\  
 +    ls -l example.py 
 +    -rw-r--rwx pi pi 4452 Jul 25 18:01 example.py 
 +    chmod o-wx example.py --- o is for owner, w is for write, x is for execute 
 +    ls -l example.py 
 +     
 +    -rw-r--r-- 1 pi pi 4452 Jul 25 18:01 example.py 
 + 
 +    The Other rights have changed from --------rwx to -------r-- 
 +\\  
 +\\ 
  
adding_and_removing_linux_permissions.1469471487.txt.gz · Last modified: 2023/03/09 22:35 (external edit)