sorry, that was an overly terse response.
What are your privileges on each of the ports?
do you have the same privileges on the secondary transfer port as you do on the main port 21?
Main Topics
Browse All TopicsHi all,
I'm using UTL_TCP to provide FTP functionality through Oracle and have set up ACL privileges for my Oracle user to connect to another server.
I create a connection specifying port 21 and pass over a username, password, then change directory, and next I issue the PASV command and get back parameters for my passive data connection. All at this point is okay (so indicating no problems with the ACL setup). At this point I try to create a connection with these parameters and get ORA-24247: network access denied by access control list
My port range on the ACL is 1 through 32767 so port number is not the issue. Also when I check the DBA_NETWORK_ACLS view I can see the entry with the target server adddress and port configuration as expected
Does anyone have any ideas on why this ACL error is occurring??
Many thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I am sure you have read this. But pay attention that it is address to:
- particular IP address or host name
- particular Oracle user
First, create an ACL:
begin
dbms_network_acl_admin.cre
acl => 'utlpkg.xml',
description => 'Normal Access',
principal => 'CONNECT',
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null
);
end;
Here the parameter principal => 'CONNECT' indicates that the ACL applies to the CONNECT role. You can define a user or a role here. The ACL is created as a file called utlpkg.xml.
After the creation, you can check to make sure the ACL was added:
SELECT any_path
FROM resource_view
WHERE any_path like '/sys/acls/%.xml';
The output is:
ANY_PATH
--------------------------
/sys/acls/ANONYMOUS/ANONYM
/sys/acls/OLAP_XS_ADMIN/OL
/sys/acls/OLAP_XS_ADMIN/OL
/sys/acls/OLAP_XS_ADMIN/OL
/sys/acls/OLAP_XS_ADMIN/OL
/sys/acls/all_all_acl.xml
/sys/acls/all_owner_acl.xm
/sys/acls/bootstrap_acl.xm
/sys/acls/ro_all_acl.xml
/sys/acls/ro_anonymous_acl
/sys/acls/utlpkg.xml
Note the last line in the output, which shows the ACL you just created. Next, add a privilege to this ACL. In this example, you are trying to limit this ACL to the user SCOTT. You can also define start and end dates.
begin
dbms_network_acl_admin.add
acl => 'utlpkg.xml',
principal => 'SCOTT',
is_grant => TRUE,
privilege => 'connect',
start_date => null,
end_date => null);
end;
Assign hosts and other details that will be subject to this ACL:
begin
dbms_network_acl_admin.ass
acl => 'utlpkg.xml',
host => 'www.proligence.com',
lower_port => 22,
upper_port => 55);
end;
In this example, you are specifying that "the user SCOTT can call only the host www.proligence.com and only for the ports 22 through 55, and not outside it." Now, let's try it:
SQL> grant execute on utl_http to scott
2 /
Grant succeeded.
SQL> conn scott/tiger
Connected.
SQL> select utl_http.request('http://w
select utl_http.request('http://w
*
ERROR at line 1:
ORA-29273: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1577
ORA-24247: network access denied by access control list (ACL)
ORA-06512: at line 1
Note the error "ORA-24247: network access denied by access control list (ACL)." The user called the http server on port 80, which is outside the allowed range 22-55. Therefore the action was prevented.
Now, add another rule to allow the communication:
1 begin
2 dbms_network_acl_admin.ass
3 acl => 'utlpkg.xml',
4 host => 'www.proligence.com',
5 lower_port => 1,
6 upper_port => 10000);
7* end;
8 /
PL/SQL procedure successfully completed.
SQL> conn scott/tiger
Connected.
SQL> select utl_http.request('http://w
UTL_HTTP.REQUEST('HTTP://W
--------------------------
</iframe><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Prolige
<META http-equiv=Content-Languag
...
Schwertner -
That is the exact procedure already done to get access to our FTP server
The port range assigned is lower port = 1 and upper port = 32767. All works fine when the initial connection to the server is created, I then send user and password commands and try and create a passive connection for the data transfer - this is when access is denied with the ORA-24247 error
When checking the port number assigned for the passive connection it has always been between 1000 and 2000 so should not be stopped by the ACL rule...
1. From the other side of your connection you have to expect FTP server, listening on that port
2. In most Linux distribution FTP is not installed
3. Even installed FTP server could no to be up - you have to check if it runs
4. Some important parameters in the FTP configuration file should be properly set for our great surprise.
You have carefully to inspect the file etc/vsftpd.conf
5. Among other parameters pay attention to the following:
In etc/vsftpd.conf uncomment the line local_enables=YES and read carefully all other lines and entries. If running ftp you get the message: 500 OOPS: could not bind listening IPv4 socket then comment the line Listen=YES in the etc/vsftpd.conf file.
6. Check the file /etc/ftpusers and delete the user name oracle. So the user oracle will have the right to logon FTP.
7. Look for firewalls, antiviruses, etc. that will stop the transfer
So I will recommend prior to involve Oracle 11g in this adventure firs to check if you can use FTP from the Command
Prompt.
I have 2 entries in DBA_NETWORK_ACLS. They both point to the same machine but one uses the IP address and the other uses the domain address...
First entry reads:
HOST: ftp.myhost.co.uk
LOWER_PORT: 21
UPPER_PORT: 32767
Second entry reads:
HOST: 10.0.0.1
LOWER_PORT: 1
UPPER_PORT: 32767
And I've tried each of these on their own and both together.
The FTP server I'm connecting to is FileZilla running on Windows (Server 2003 I believe)
Business Accounts
Answer for Membership
by: sdstuberPosted on 2008-03-12 at 07:17:20ID: 21106170
In 11g ALL access is denied by default.
Use DBMS_NETWORK_ACL_ADMIN to grant your privilges