FIND/CHMOD combined

look i tried to execute the code you suggest ..through the command prompt and using telnet. the chmod works fine while find or ls and few other don't work.
What could be the problem here? Is that because of the Linux distribution that doesn't accept these commands or something?
Please explain to me. Thanks

I think Porter has a point. Are you connected to the telnet or ftp port? What error messages are you getting? If you are connecting to ftp, have you tried the "help" command?

Well it seems we came to the truth. help returns something that i was afraid of all the time.

214-The following SITE commands are recognized
ALIAS
CHMOD
IDLE
UTIME
214 Pure-FTPd - http://www.pureftpd.org/

that probably means i have available only these four commands.
What's the idea of having only these commands? Security/.?

Thanks!!!

You are obviously connected to the FTP port. As Porter stated, there are only a limited number of commands available in FTP and the find command is not one of them. This machine appears to be more restrictive than some. This also explains the acceptance of upper case commands - FTP is sometimes more forgiving about case.

But, what are my options after this? can i make and upload a batch file to the server and then execute it programatically?

And again i am confused; if it allows the CHMOD why it doesn't allow -R (recursive execution) of the CHMOD command? It doesn't make sense that i cannot execute CHMOD with -R ... correct me if i am wrong. Thanks!!!

FTP and shell are different animals. The unix shell chmod is different from the ftp chmod. They are related by a common name and function, but are not the same thing. You could try "help chmod" to see what options FTP's chmod supports.

You are confusing what is available to you under FTP and what is available in a normal unix shell. There are vast differences. Think of it as the difference as to what's available logging into a windows ftp server and what is available at a DOS prompt. That is part of what initially made your original query so hard to understand.

Regarding executing a script, FTP does not normally allow that. You will probably need to get access to a normal unix shell logon.

Ok then we've finally located the problem. I didn't know that there are two kinds of CHMOD command (FTP and CHMOD from shell).

Means You do suggest another approaching like access to a normal unix shell logon.
I have only one question about this; how (if there is a native C#.NET code for that - mono has some libraries that provides support for SSH protocol but i have never heard about the .NET framework that does the same)?

Thanks a lot kahuna and other :slight_smile:

Microsoft Windows does not use SSH as a native protocol.

/n software inc - The Leading Provider of Internet Components provides an implementation.

As far as how, you'll need to get the unix administrator to set you up with a unix account. You could reuse some of your existing code, but connect to the telnet port instead of the ftp port. I think Porter suggested ssh as a more secure way of connecting. But telnet should at least get you there if you are not concerned with security.

I should qualify the telnet statements. It assumes that there aren't firewalls in the way and that your unix box is not strictly an ftp server. That the unix system allow remote logins.

Ok this is my final question here. But 1st let me say something; I learned a lot from your replies indeed and i want to thank you for that. Thanks!!! it is highly appreciated:)

As for the question; What you believe is the best way to make an FTP client if i miss the simplicity of System.Net class which comes with Framework 2.0 ?
What is an alternative of this .NET class that exposes FtpWebRequest/Response classes and allow you to see/upload/download files in just a few lines of code?
What if i go for more intuitive code like using SSH protocol??? If it's possible at all?

Thanks ones again :slight_smile: you are great :slight_smile:

*BUMP*

C'mon guys!@ one more answers and that's all i want. Thank you very much :slight_smile:

I suggested you run Putty's plink.exe as a child process and you did not want that.

I suggested an implementation of ssh in C# and you did not want that.

You can implement SSH in C# if you want but you may underestimate the complexity or have better things to do with your time.

I think most people here are more familiar with unix. I'm not sure how much .NET expertise you'll find here.

Maybe you are right kahuna. Sorry for the inconvinience. I go to ask people to other forums related with .NET.

Porter: /n software inc - The Leading Provider of Internet Components is commercial library and it's not very cheap. Plus, as i said i am more interested about solution wihtout using 3rd party products that means pure C# code.
However thanks for your willing to help.

Thanks UNIX masters .. bye for now :slight_smile: