SmartFTP FTP Library
IFTPConnection::SetUnixPermissions Method

Sets the unix mode of a remote file or folder. 

The client sends a SITE CHMOD command. If the FTP command is not supported the function fails.

HRESULT SetUnixPermissions(
    [in] BSTR name, 
    [in] long nAttributes

The unix mode is typically found with octal representation. E.g. octal 0775.

C++, C#

SetUnixPermissions("", 0775); // note the 0 octal prefix


SetUnixPermissions("", 509)

will both result in the following string sent to the server: 


What do you think about this topic? Send feedback!
Copyright (c) by SmartSoft Ltd. All rights reserved.