Non root user gets setsockopt error when running ftp in debug mode (-d) on RHEL6
Issue
Running an ftp script (ftp -dvn < ftp_commands), a non-privileged user gets the following error:
ftp> ls
ftp: setsockopt (ignored): Permission denied
And in an strace:
bind(4, {sa\_family=AF\_INET, sin\_port=htons(0), sin\_addr=inet\_addr("172.21.25.16")}, 128) = 0
setsockopt(4, SOL\_SOCKET, SO\_DEBUG, [1], 4) = -1 EACCES (Permission denied)
When ftp is run as root, there is no error.
Environment
- Red Hat Enterprise Linux 6
- ftp-0.17-51.1.el6.x86_64
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.