Popularize basic linux knowledge, Linux File and folder permissions. Do not lose 777 permissions. The online tutorials are too complex and lengthy. The summary is as follows...
1. View Linux File Permissions
Ls-l (General)
Ll (applicable to Ubuntu, equal to ls-al)
Ii. Permission identifier
R (read), w (write), x (execution)
4 (read), 2 (write), 1 (execution)
Note: The directory must have execution permission to read
Ii. Modify Linux File Permissions
Method 1
Chmod-r 777 dir/
-R: Change the dir directory and all the sub-files and folders in the dir directory.
777 change "file owner, user group, and other users" to read, write, and execute.
Method 2
Chmod parameters: a (user and group), u (user), g (group), 0 (other Users)
Chmod operators: + (plus),-(minus), = (assign)
Chmod + x file.txt (user, group, and other users, add execution permission)
Chmod u + x file.txt (user, add execution permission)
Iii. Linux Common File Permissions
777 (read/write execution, read/write execution, read/write execution)
755 (read/write execution, read execution, read execution)
644 (read/write, read, read)
400 (read, prohibit, or prohibit