General discussion

Locked

Set file permissions using WinInet FtpCommand

By tcruise ·
I'm trying to use the FtpCommand function in Microsoft's WinInet.dll library to set file and directory permissions on a UNIX FTP server.

When I run the following command from the MS DOS FTP client, it works and I get the expected response (note that it doesn't matter whether mydir contains the leading "/"):

ftp> quote site chmod 0700 mydir
250 Changed.

When I try to issue the exact same command via the FtpCommand function, it fails. Here is the response I get back from the FTP server:

200 Type okay.
200 PORT command successful.
500 Syntax error, command unrecognized.

I AM able to get "rest" and "retr" commands to work using FtpCommand, but NOT the "chmod".

I am calling the FtpCommand function from a VB6 application running under Windows 98 SE.
The FTP commands are being executed from the root directory. The directory I am trying to change perms for is directly under the root directory.

Why does the chmod command work from the DOS FTP client, but NOT from FtpCommand???

I need to solve this ASAP, please!

This conversation is currently closed to new comments.

1 total post (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Back to Web Development Forum
1 total post (Page 1 of 1)  

Related Discussions

Related Forums