You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Ronel Sumibcay <RS...@reddoor.biz> on 2005/04/19 19:12:15 UTC
[NET] Setting file permissions using FTPFile
I am trying to set the file permissions on files on the remote server by
calling the setPermission() method of an FTPFile object. However the
permissions are not being set.
FTPFile[] files = ftpClient.listFiles();
for (int i=0; i<files.length; i++) {
files[i].setPermission(FTPFile.WORLD_ACCESS, FTPFile.READ_PERMISSION,
true);
}
Am I missing a step? I've already looked through the documentation and
archives for some clue.
This is what my program logic needs to do:
1. Transfer files to a remote server
2. Set read permissions on the transferred files so a PHP
application can later read the files.
I am currently developing on Mac OS X.
Thanks!
-ronel