Hi,
I am using webMAN 1.47.48s MOD (NTFS) [Full] on Evilnat 4.93 PEX operating as CEX COBRA.
When uploading a file through webMAN’s FTP server with WinSCP configured to preserve timestamps, the file uploads successfully but its modification time is set to the current PS3 time.
The FTP log shows that WinSCP sends a correctly formatted MFMT command after the upload:
STOR PARAM.PFD
150 OK
226 OK
MFMT 20070108220422 PARAM.PFD
501 Error in arguments
I checked the current source in include/ftp.h. The MFMT handler requires this condition:
str_num_length(param, MFMT_MODTIME_LEN) == MFMT_MODTIME_LEN
MFMT_MODTIME_LEN is 14.
However, str_num_length() currently returns 0 after successfully reading all max_digits characters:
static int str_num_length(const char *ptr, int max_digits)
{
if(ptr == NULL) return 0;
for(int len = 0; len < max_digits; len++)
{
if(ptr[len] < '0' || ptr[len] > '9') return len;
}
return 0;
}
This means a valid 14-digit MFMT timestamp returns 0 rather than 14, so the validation condition can never succeed for a correctly formatted timestamp. This appears to explain the 501 response.
The proposed correction is to replace the final return value:
return max_digits;
After that change, the MFMT handler should be able to parse the timestamp and reach its existing cellFsUtime() call.
Downloading files from the PS3 preserves their modification times correctly. The problem occurs specifically when uploading: the STOR operation succeeds, but webMAN rejects the subsequent MFMT command.
A corrected build would still need testing to confirm that the remaining timestamp conversion and cellFsUtime() operation work correctly.
Hi,
I am using webMAN 1.47.48s MOD (NTFS) [Full] on Evilnat 4.93 PEX operating as CEX COBRA.
When uploading a file through webMAN’s FTP server with WinSCP configured to preserve timestamps, the file uploads successfully but its modification time is set to the current PS3 time.
The FTP log shows that WinSCP sends a correctly formatted MFMT command after the upload:
STOR PARAM.PFD
150 OK
226 OK
MFMT 20070108220422 PARAM.PFD
501 Error in arguments
I checked the current source in include/ftp.h. The MFMT handler requires this condition:
str_num_length(param, MFMT_MODTIME_LEN) == MFMT_MODTIME_LEN
MFMT_MODTIME_LEN is 14.
However, str_num_length() currently returns 0 after successfully reading all max_digits characters:
This means a valid 14-digit MFMT timestamp returns 0 rather than 14, so the validation condition can never succeed for a correctly formatted timestamp. This appears to explain the 501 response.
The proposed correction is to replace the final return value:
return max_digits;
After that change, the MFMT handler should be able to parse the timestamp and reach its existing cellFsUtime() call.
Downloading files from the PS3 preserves their modification times correctly. The problem occurs specifically when uploading: the STOR operation succeeds, but webMAN rejects the subsequent MFMT command.
A corrected build would still need testing to confirm that the remaining timestamp conversion and cellFsUtime() operation work correctly.