Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to change permissions on a file in linux

sudo chmod -R ugo+rwx /file/path
Comment

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 :: bash tokens in variable 
Shell :: centos 7 openldap install 
Shell :: see network trafic linux 
Shell :: how to paste in git bash 
Shell :: how to install react native 
Shell :: docker image rm image without tag 
Shell :: ubuntu create directory with permissions 
Shell :: create virtual environment ubuntu 
Shell :: install steam on ubuntu 
Shell :: laravel/sail 
Shell :: git reset head to previous commit 
Shell :: create folder in terminal 
Shell :: whereis alpine 
Shell :: how to install wireshark on fedora 
Shell :: tr unix use 
Shell :: copy directory 
Shell :: beyond compare mac using brew 
Shell :: git change message specific commit 
Shell :: how to revert a git stash 
Shell :: wslconfig example 
Shell :: linux check ssh connections 
Shell :: how to add git bash to context menu 
Shell :: The platform "win32" is incompatible with this module. 
Shell :: bash if else 
Shell :: linux alias 
Shell :: how to remove blank lines in bash 
Shell :: how to upgrade packages in ubuntu 20.04 
Shell :: install kubectl windows 10 
Shell :: zsh: permission denied 
Shell :: install mpfr ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
1+1 =