257: Pathname CreatedFTP reply code 257 is returned in response to MKD (make directory) or PWD (print working directory) commands. For MKD, it confirms the directory was created and includes the new directory path in quotes. For PWD, it returns the current working directory path in quotes. The path is always enclosed in double quotes in the response (e.g., 257 "/home/user/newdir" created). If the path itself contains a double quote, it is escaped by doubling it. This response is how FTP clients determine their current location on the server.
257 Pathname Created220 ftp.example.com FTP server ready
USER alice
331 Password required
PASS ****
230 User alice logged in
PWD
257 "/home/alice" is current directory
MKD reports
257 "/home/alice/reports" directory createdThe directory path in the 257 response is enclosed in double quotes. When parsing programmatically, extract the text between the first and last double quotes, replacing any doubled quotes ("") with single quotes (").
After MKD creates a directory, use CWD to navigate into it. The path returned in the 257 response is the absolute path you can use with CWD.
The client sent PWD and the server returned the absolute path of the current working directory. FTP clients use this to display the current location and resolve relative paths.
The client sent MKD dirname and the server created the directory. The 257 response includes the full path of the newly created directory.
| Specification | Section |
|---|---|
| RFC 959 | RFC 959 §4.2 |
This reference was compiled from official RFCs, protocol specifications, and hands-on troubleshooting experience. AI tools were used primarily for formatting and organizing the content on the page.