Jump to content


SetUnixAttributes sending wrong value

  • Please log in to reply
1 reply to this topic

#1 carl

  • Members
  • 2 posts

Posted 14 November 2005 - 05:30 PM


I'm using the SmartFTP library with C++. I found that the SetUnixAttributes() method does not send the correct value to the server.

For example:


The server log shows:

[20051114 17:27:28] SITE CHMOD 2FF myfile.txt

It should be SITE CHMOD 767 myfile.txt

#2 eyebex

  • Licensed User
  • 1860 posts
  • Gender:

Posted 14 November 2005 - 05:52 PM

No, this is no bug. The Unix-like "767" is on octal format (which is normally preceeded by "0", a zero), but the paramater "767" is interpreted as a decimal number. Fix: Use "0x767" or "767h" (depending on the script language you use) as a parameter to specify a hexadecimal number. For digits < 8 these are the same as octal.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users