-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchmod
29 lines (24 loc) · 752 Bytes
/
chmod
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# Linux permissions
# User Group and Others
0 No Permission ---
1 Execute --x
2 Write -w-
3 Execute + Write -wx
4 Read r--
5 Read + Execute r-x
6 Read +Write rw-
7 Read + Write +Execute rwx
# no need to memorize all of this; instead learn the following
0 No Permission
1 Execute
2 Write
4 Read
# To recursively remove execute permissions from files without touching folders
If you are fine with setting the execute permissions for everyone on all folders:
chmod -R -x+X *
The -x removes execute permissions for all
The +X will add execute permissions for all, but only for directories.
# fix cannot ls permission issue
chmod 775 .
# give read write execute permission to other users in the same group as the owner(user)
sudo chmod 770 -R username