Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

linux change permission

permission = read(4) + write(2) + execute(1)

===== CHMOD ===== ( change permission for file )
chmod [permissions] file
(u)ser, (g)roup, (o)ther, (a)ll
(r)ead, (w)rite, (e)xecute
(+) add permission, (-) remove permission, (=) set permission

#Examples:
chmod o+rwx file # add rwx for other
chmod o=rw file  # set rw for other
chmod og-x file  # remove x from other and group
chmod a+r file   # everyone can read

# Numeric
chmod 724 file # owner=everything, group=writing, other=reading
                                            
first number is for owner of file, 
second for group of owner,
third for everyone

===== OTHER =====
ls -l [path]

---------- # file
d--------- # directory

-rwx------ # owner
----rwx--- # group
-------rwx # other
Comment

change user permission linux

chmod u-rxw  file == remove permission
chmod u+rxw  file == give permission back

chmod +755 file == give permission

r - read
w - write
x - execute 
755 - is binary format 
Comment

PREVIOUS NEXT
Code Example
Shell :: -v /var/run/docker.sock jenkins/jenkins 
Shell :: pyaudio windows fail 
Shell :: gitignore httaccess 
Shell :: Install SSSM Agent on Amazon Linux 2 
Shell :: create new git branch from existing branch 
Shell :: install heroku cli for linux 
Shell :: update vs code ubuntu 
Shell :: vcpkg install 64 bit 
Shell :: bash debug show line numbers 
Shell :: change the keyboard language in i3wm 
Shell :: ubuntu add multiverse 
Shell :: how to use git 
Shell :: Checking dependencies BASH 
Shell :: vscode extension generate vsix 
Shell :: git submodule example 
Shell :: insta;; fingerprint in kali linux 
Shell :: vscode installation ubuntu 
Shell :: kill port 8080 process in linux 
Shell :: git merge master into branch 
Shell :: zsh increment variable 
Shell :: sudo pkg instatll lando-stable.deb 
Shell :: ubuntu install docker-compose 
Shell :: install adminlte in laravel 
Shell :: What Are The Correct Permissions For ~/.ssh Directory? 
Shell :: new screen linux 
Shell :: switch user ubuntu 
Shell :: move commit from master to branch 
Shell :: linux wsl on window space used 
Shell :: linux bash do something when file changes 
Shell :: cmake command not found 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =