commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Yasuda <constructic...@yahoo.com>
Subject Re: Net Problem with FTPClient class
Date Thu, 30 Dec 2004 02:14:13 GMT
Thanks.  Adding jakarta-oro-2.0.8.jar to my CLASSPATH
got rid of the runtime error.

If I have:
FTPClient ftp = new FTPClient();
ftp.connect("server");
ftp.login("root", "password");
ftp.makeDirectory("/home/root/temp");
FTPFile[] files = ftp.listFiles("/home/root");
if (files[i].getName().equals("temp")) {
    files[i].setUser("gary");
    files[i].setGroup("users");
    System.out.println(files[i].getUser() + " " +
files[i].getGroup());
}
ftp.disconnect();

How come the getUser() returns "gary" and getGroup()
returns "users"?  When I log on the system and do a
"ls -ld /home/root/temp", it is owned by "root" and
"sys", not "gary" and "users".  ftp.login was done
with the "root" user so changing owner should not have
permission problems.

--- Skip/Jan Hodgson <skiphod@bigpond.com.au> wrote:

> Are you sure you are actually getting a
> MalformedPatternException?  I 
> tried something like this with commons-net-1.2.2 and
> got a 
> NoDefClassFoundException at runtime looking for 
> MalformedPatternException.class.  The commons-net
> package also seems to 
> require the package org/apache/oro/text/regex.  This
> package is 
> available as jakarta-oro-2.0.8.jar .
> 
> Just a thought.
> Skip Hodgson



		
__________________________________ 
Do you Yahoo!? 
Send a seasonal email greeting and help others. Do good. 
http://celebrity.mail.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message