ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Ant1.8 copy task gives error "Failed to copy" with "Permission denied"
Date Tue, 13 Apr 2010 14:49:36 GMT
On 2010-04-13, SHAILJA <shalja.rudra@gmail.com> wrote:

>      [copy] Copying
> /u/kumari/main/shailja/src/java/a/utd/writer/realtimelagstats/load_stats.pl
> to /u/kumari/main/shailja/bin/share/load_stats.pl

> Failed to copy
> /u/kumari/main/shailja/src/java/a/guas/utd/writer/realtimelagstats/load_stats.pl
> to /u/kumari/main/shailja/bin/share/load_stats.pl due to
> java.io.FileNotFoundException /u/kumari/main/shailja/bin/share/load_stats.pl
> (Permission denied)

this time something is different, the file the exception talks about
actually is the same as the one the task wants to copy to.  In your
first post they've been different.

> 	at org.apache.tools.ant.taskdefs.Copy.doFileOperations(Copy.java:839)

just rethrows the exception from

> Caused by: java.io.FileNotFoundException:
> /u/kumari/main/shailja/bin/share/load_stats.pl (Permission denied)
> 	at java.io.FileOutputStream.open(Native Method)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:179)
> 	at java.io.FileOutputStream.<init>(FileOutputStream.java:131)
> 	at
> org.apache.tools.ant.util.ResourceUtils.copyResource(ResourceUtils.java:460)

which just tries to open the output file.

>  ls -alh
> /u/kumari/main/shailja/src/java/a/guas/utd/writer/realtimelagstats/load_stats.pl
> -rwxrwxr-x

> this file exists with right permission

Yes, the error occurs on the destination side.

> copy task should copy from source to detination location
> /u/kumari/main/shailja/bin/share/load_stats.pl
> here location /u/kumari/main/shailja/bin/share exists and no symlink is
> there.

But do you have permissions to write there - and is there enough space?
Does a simple

cp /u/kumari/main/shailja/src/java/a/guas/utd/writer/realtimelagstats/load_stats.pl /u/kumari/main/shailja/bin/share/

succeed on the command line?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message