Hi

I am uploading files to an Apache server. The files have an attribute of 644. I need people other than the person who uploaded the files to have access to them so I need to change the attribute to 666. Is this possible using the software if so how?

Thanks

Nick Steele

asked 11 Aug '11, 17:43

NickS's gravatar image

NickS
15
accept rate: 0%

edited 11 Oct '11, 17:10

Martin%20Vobr's gravatar image

Martin Vobr ♦♦
335310


Unfortunately, there is no 'Change File Attributes' FTP command.

But some servers support SITE CHMOD command. To send a SITE command following code can be used:

string response = client.Site("CHMOD 666 file.txt");

If you need to parse FTP response for future processing, following code can help you (it is equivalent of the previous one line sample code):

client.SendCommand("SITE CHMOD 666 file.txt");
FtpResponse response = client.ReadResponse();
link

answered 12 Aug '11, 13:23

Lukas%20Matyska's gravatar image

Lukas Matyska ♦♦
90117
accept rate: 28%

That worked thanks

(12 Aug '11, 17:46) NickS

I'm very new to VB. Can you please tell me how to get the "Site" property (I rely heavily on intellisense)?

(06 May, 11:02) zalmyc

The "Site" is not a property, it is a method. It is used for executing a command specific for the current FTP server. An argument of the Site method is a string with the command - e.g. "CHMOD 666 file.text".

Each FTP server has a specific set of supportet SITE commands (and some FTP servers do not support SITE command at all). E.g. the Appache FTP server accepts following SITE commands: http://mina.apache.org/ftpserver/site-commands.html Or the Titan FTP server accepts following SITE commands: http://titanftp.com/support/titanftp/v8/webhelp/SITE.htm

(06 May, 16:20) Jan Sotola ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×152
×16

Asked: 11 Aug '11, 17:43

Seen: 471 times

Last updated: 06 May, 16:20