commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Henri Yandell <>
Subject Re: FileUtils question..
Date Thu, 09 Sep 2004 21:43:02 GMT
Easiest thing would be to grab the source for
FileUtils.copyFile(File,File,boolean) from
insert this in your code, and try removing some of the bits to see
what exactly is stopping the access, or if it's a problem in the
underlying JDK (ie your system somehow).

 Looking at FileUtils.copyFile(File,File,boolean), and
CopyUtils.copy(InputStream,OutputStream); there doesn't seem to be
anything obviously bad, however maybe the FTP code in Java doesn't
like the checks at the front of copyFile.


On Thu, 9 Sep 2004 15:17:53 -0400, Chandrasekhar, Preetham
<> wrote:
> Hi,
> I am having trouble with accessing the ftp using the FileUtils class in the
package of the Jakarta project.
> Here's the extract of my code which i assume will make sense:
> url_copytodir = new URL("");
> file_copytodir = new File(url_copytodir.getFile());
> FileUtils.copyFile(file1,file_copytodir);
> However, even if I am accessing as root and preetemp and try.txt were created by me,
it says access denied!
> I tried copying contents from a file in ftp to a file on the pc that im running the application.....
and that works fine!
> Is there anyway of achieving this task using FileUtils only?!
> Any suggestions?
> thanks
> Preetham
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message