System Set Permissions Accidentally, and is Corrupt My phone's system folder at /system was corrupt.  I accidentally set its permissions to rw-r--r--.  Then, I reboot my phone, and nothing is working.
Here's what I mean: 


1st reboot: power off;
2nd automatic reboot: automatically went to Recovery Mode;


When I reboot, it doesn't go to the Operating System.  It just sends me to Recovery Mode.

Offline Charging is (I think) also not available.  It powers on the device, but it doesn't play the Boot Animation (because the System Folder is corrupt), so it just send me to Recovery Mode.

What should I do?  How could I set the permissions of the system folder back to its default state rwxr-xr-x?

I had think of 3 possible ways:


chmod the system folder using TWRP Recovery's Built - in chmod.  


I need to find the "Octal Code" of the permission rwxr-xr-x.

Install the stock ROM (in this case, CM 12.1) through recovery.


I don't know if this one will work.

Wipe the System Partition, and install the ROM.


I have no idea if this will work, or not.
The problem is solved quickly after digging on TWRP, and found out that there is a restore option.

Luckily, I have a backup of the System Partition.

The ROM installed on my device was CM 12.1, which is running Android 5.1 Lollipop.

The backup system (pre - installed ROM) was the stock ROM, which is running Android 4.4 Kitkat.

Guess I should just install that CM ROM.

By the way, I could get into the Operating System now, but I have another problem, which I will post in an another question.