Reputation: 2109
I am using sys/socket.h. When I try to make a socket connection in Apache server environment. It fails to make a socket connection with Permission Defined Errno 13. Is there some permission that I need to give to apache.
Thanks!!
Upvotes: 3
Views: 1952
Reputation: 41046
Temporally disable SELinux and see what happens:
Edit /etc/selinux/config
as root and change the SELINUX line to SELINUX=disabled
. If this fixes your problems, you should reenable SELinux and get in contact with the policy writers (i.e. file a bug report at your distributions bugtracker).
Thanks for the edit Jonas ;)
A couple of months ago I had a similar problem with a Fedora server, just had to run setsebool -P httpd_can_network_connect 1
to fix
Upvotes: 2
Reputation: 70971
In case you are trying to bind()
a socket to a port below 1024 you need superuser rights.
When trying to connect()
, EACCES
(13) might be returned if a local firewall prohibits the connection.
Upvotes: 0