Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

chmod

chmod u=rwx,g=rx,o=r <file>	# Set the rights to -rwxr-xr--
chmod o-r <file>			# Remove 'read' from others
chmod g+w <file>			# Add 'write' to group

chmod -R 754 <directory>	# Set the rights to -rwxr-xr-- recursive

┌─────┬─────┬─────┐
│ r-- │ -w- │ --x │
│  4  │  2  │  1  │
├─────┼─────┼─────┼─────┐
│ rw- │ r-x │ -wx │ rwx │
│  6  │  5  │  3  │  7  │
└─────┴─────┴─────┴─────┘
Comment

chmod

sudo chmod -R 777 name-file-wht-upu-want     ///open for accsess all users 
sudo chmod 644  #for example file /etc/hosts 
https://ss64.com/bash/chmod.html
Comment

chmod

chmod u=rwx,g=rx,o=r myfile

chmod 754 myfile

# 4 stands for "read",
# 2 stands for "write",
# 1 stands for "execute", and
# 0 stands for "no permission."
Comment

chmod

For changing permissions mode of files as "file.exe" follow next examples idea:
chmod file.exe ugo+x #Add x:execute permissions to u:user g:gropu and o:others
chmod file.exe o-rw  #Remove r:read and w:write permissions to o:others
chmod file.exe +rwx  #Add all r:read, w:wirte and x:execute permissions to all.
Comment

chmod

chmod file.exe +rwx 
chmod -R 777 ./
Comment

chmod

chmod -R 777 diretorio
Comment

PREVIOUS NEXT
Code Example
Shell :: Files by size 
Shell :: static ip wsl2 
Shell :: flushbar flutter 
Shell :: remove write proteced in usb ubuntu 
Shell :: git a clean history 
Shell :: bash rename multiple files pattern 
Shell :: bash check if file is readable 
Shell :: mdem ubuntu add user to sudo 
Shell :: how to install spotify in ubuntu 
Shell :: visual studio export installed nuget pacjkages 
Shell :: raspberry pi wifi headless 
Shell :: run shell script remotely using ssh 
Shell :: Change git Committer Date 
Shell :: wsl 2 installation 
Shell :: clone all github repos 
Shell :: create new github repo 
Shell :: where to store env file in firebase functions 
Shell :: git pull only master branch 
Shell :: install crontab in linux 
Shell :: git diff 
Shell :: folium 
Shell :: how to remove dual boot ubuntu from windows 10 
Shell :: crear una aplicacion con angular cli 
Shell :: git revert remote branch 
Shell :: time command windows 
Shell :: DNS_PROBE_FINISHED_NXDOMAIN linux 
Shell :: how can fix some refs in git github 
Shell :: adb restart application 
Shell :: Install Pop Shell Window Tiling Extension on Ubuntu 20.04 
Shell :: command to transform to asci code 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =