renameTo function & Somba

I have a question and I appologize if this has been answered somewhere already.

Set up:

I have a unix box set up with samba (version 3.0.23a I think) and I've mounted a directory that's located on a windows box running Windows XP. My java program is running in unix. It is running as a specific user. The root user used Samba to mount the windows directory.

Problem:

Inside of my java program I use the renameTo command to move a pdf file that's located on the unix box over to the directory being mounted on Samba. The renameTo returns a false & is unable to move the file.

When I move the file manually on the command line using the mv command I get two alerts talking about that the mv command is unable to preserve modification time and it is unable to set permissions. But the file still moves. Can anyone help?

Thanks,

Josh

[886 byte] By [Joshgentia] at [2007-10-3 4:47:18]
# 1

The Java rename method uses behind the scenes the operating system's rename function and has the same limits. In particular a file cannot be renamed accross different file systems; for example if /home is on a different partion than /tmp, you can't simply rename a file from /tmp to your home directory.

When it's not possible to rename, the only way an application can move a file is to copy the file through reading and writing, and delete the original. This is what the unix command mv does.

jsalonena at 2007-7-14 22:51:44 > top of Java-index,Archived Forums,Socket Programming...