Solved:
In Linux there sometimes SELinux causes the problem. To fix the issue follow the bellow steps.
Open the file/etc/selinux/config with root permission
with an editor and then change the line SELINUX=enforcing
to SELINUX=permissive
Finally: Reboot the system.