If you have an error containing "Received Too Large SFTP Packet" or "Server sent command exit status 127", you can try this method
First select the SCP file protocol in the selectmenu as seen on image below. Then click Advance. On Advance->SCP/Shell Shell:, select sudo su - as seen on image below.
This will take a long time to authenticate. After authentication, you can now edit your file or change permission.