RHEL7 dos2UNIX return code 13

Hi, upgraded one of the server to RHEL7. A Shell script uses dos2unix to convert EOL characters to Linux format and checks return code. In RHEL6, if conversion fails shell script returns code 1 where as if conversion fails in RHEL7 script returns return code 13. Is it possible to change RHEL7 return code(13) as in RHEL6 (1) ?

[satya@rhel6 tmp]$ cat /etc/redhat-release
Red Hat Linux release 6.x
[satya@rhel6 tmp]$ dos2unix testfile
dos2unix: converting file testfile to UNIX format ...
dos2unix: problems converting file testfile
[satya@rhel6 tmp]$ echo $?
1
[satya@rhel6 tmp]$
[satya@rhel7 tmp]$ cat /etc/redhat-release
Red Hat Linux release 7.x
[satya@rhel7 tmp]$ dos2unix testfile
dos2unix: testfile: Permission denied
dos2unix: converting file testfile to Unix format ...
dos2unix: problems converting file testfile
[satya@rhel7 tmp]$ echo $?
13
[satya@rhel7 tmp]$

thanks
satya

These commands should help

file testfile
stat testfile
enca testfile

--- Post updated at 10:12 ---

I apologize for the previous post, I did not understand the question, but what does the next command output give here and there?

dos2unix -i testfile

The point is not in the dos2unix utility but in the file permissions.
I changed the file permissions and got the same error code from any utility!

chmod 444 file
echo "hi" > file
Permission denied

What be the output of dos2unix -V on either system?

Thank you for the reply. Java application executes dos2unix on linux box and look for return codes 0(success) or 1(fail). As failure return code changed in RHEL7, java app code failing. so want to get some idea on whether this 13 return code coming from linux or dos2unix utlity.

--- Post updated at 08:34 PM ---

Thank you RudiC, here is the o/p from RHEL7 and RHEL6. Java application executes dos2unix on linux box and look for return codes 0(success) or 1(fail). As failure return code changed in RHEL7, java app code failing. so want to get some idea on whether this 13 return code coming from linux or dos2unix utlity.

[satya@rhel7 tmp]$ dos2unix -V
dos2unix 6.0.3 (2013-01-25)


[satya@rhel6 ~]$ dos2unix -V
dos2unix 3.1 (Thu Nov 19 1998)

The java code is wrong. The standards say that exit code 0 is success and that failure is denoted by a non-zero value (not just 1). Some utilities have other non-zero exit values that still indicate success, but no program should assume that only exit code 1 means failure.

The standards also specify that the some utilities are required to return exit code 126 if an attempt was made to invoke a utility, a utility by that name was found, but the utility was not in the proper form to execute as a utility and to return exit code 127 if an attempt was made to invoke a utility but no utility of the desired name was found.

First, make sure the two versions react differently to the identical error situation, which is not obvious in post #1. Are both running into the "permission denied" error? If that's the case, and you can't make the java code behave, consider installing the older dos2unix version on the RHEL7 system.

Still as an option to check access by acl and entry into groups

getacl
groups