You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Srinivas Somonahalli <sr...@intelliden.com> on 2005/11/10 01:01:45 UTC

How to change the file permissions on a remote FTP Server ?

Hi All,

I am using org.apache.commons.net.ftp.* package for my FTP related
activities in my code.

I want to store a file in the remote FTP server with write permission set to
the file so that file can be overwritten by any one.

I am using storeFile(String rem,InputStream local) API to store the file in
the remote server.But by default this API is storing the File on remote FTP
server with "-rw-r--r--" permission .

Is there a way that I can change the permission bits for this file on the
remote FTP server to make it writeable by anyone? If not can I set some
properties before the call to storeFile() API so that the file is stored
with required permissions set ?

Any help in this regard is highly Appreciated.

Thanks,
Srini


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


Re: How to change the file permissions on a remote FTP Server ?

Posted by Mario Ivankovits <ma...@ops.co.at>.
Srinivas Somonahalli wrote:
> I want to store a file in the remote FTP server with write permission set to
> the file so that file can be overwritten by any one.
>   
As Sylvain already stated its not possible for now in VFS.

If you use plain commons-net you could try something like

ftpClient.site("CHMOD 666 filename");

---
Mario


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