Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Network Access denied by ACL

PhilMan2Jan 28 2015 — edited Jan 30 2015

Hello,

I'm trying to execute the following code in Oracle 11.g to test FTP to a server. I installed the FTP utility in the SUSAN schema.

-- Get a directory listing from a remote FTP server.
DECLARE
  l_conn UTL_TCP
.connection;
  l_list ftp
.t_string_table;
BEGIN
  l_conn
:= ftp.login('my.server.com', '21', 'myusername', 'mypassword');
  ftp
.list(p_conn  => l_conn,
  p_dir 
=> '/public_html/images',
  p_list 
=> l_list);
  ftp
.logout(l_conn);

 
IF l_list.COUNT > 0 THEN
  
FOR i IN l_list.first .. l_list.last LOOP
  DBMS_OUTPUT
.put_line(i || ': ' || l_list(i));
  
END LOOP;
 
END IF;
END;

/


I get the following error:

Error report -
ORA-24247
: network access denied by access control list (ACL)
ORA-06512
: at "SYS.UTL_TCP", line 17
ORA-06512
: at "SYS.UTL_TCP", line 267
ORA-06512
: at "SUSAN.FTP", line 112
ORA-06512
: at "SUSAN.FTP", line 651
ORA-06512
: at line 6


I thought I setup the ACL properly. When I check on it I get the following results:

SELECT host, lower_port, upper_port, acl FROM dba_network_acls ;

my
.server.com  21  21  /sys/acls/ftp_at_myserver.xml


When I check on the privileges with the following code: I get the following:

SELECT acl,
  principal
,
  privilege
,
  is_grant
,
  TO_CHAR
(start_date, 'DD-MON-YYYY') AS start_date,
  TO_CHAR
(end_date, 'DD-MON-YYYY') AS end_date
FROM  dba_network_acl_privileges

/sys/acls/ftp_at_myserver.xml  SYS resolve true 
/sys/acls/ftp_at_myserver.xml  SYS connect true 
/sys/acls/ftp_at_myserver.xml  APEX_040200 resolve true 
/sys/acls/ftp_at_myserver.xml  APEX_040200 connect true 
/sys/acls/ftp_at_myserver.xml  SUSAN resolve true  28-JAN-2015
/sys/acls/ftp_at_myserver.xml  SUSAN  connect true  28-JAN-2015


I can't figure out what the problem is.  Thanks very much for looking at this.

Phil



Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 27 2015
Added on Jan 28 2015
6 comments
2,113 views