Check to make sure you don’t have any strange newlines. It could be that you have Windows newline characters that are causing problems.
Fix.
dos2unix file
Check to make sure you don’t have any strange newlines. It could be that you have Windows newline characters that are causing problems.
Fix.
dos2unix file
Thank’s but it did not work for me. and now it’s showing up new error after running dos2unix
=============
error: target uid/gid (2727/2728) mismatch with directory (2727/99) or program (0/0) or trusted user (0/10)
=============
NVM, it’s fixed, the ownership was changed to root.root automatically while running dos2linux. I changed the ownership to user.user. It’s working now.