Differences
This shows you the differences between the selected revisions of the page.
scriptcommand_chmod 2011-11-28 | scriptcommand_chmod 2023-05-02 (current) | ||
Line 1: | Line 1: | ||
- | ====== chmod ====== | + | ====== chmod command ====== |
- | [[task_properties|Changes permissions]] of one or more remote files. | + | [[task_properties|Changes permissions]] of one or more remote files. |
+ | |||
+ | ===== Syntax ===== | ||
chmod <mode> <file> [ <file2> ... ] | chmod <mode> <file> [ <file2> ... ] | ||
+ | |||
+ | ===== Remarks ===== | ||
''mode'' can be specified as three or four-digit octal number. | ''mode'' can be specified as three or four-digit octal number. | ||
Filename can be replaced with [[file_mask|wildcard]] to select multiple files. | Filename can be replaced with [[file_mask|wildcard]] to select multiple files. | ||
+ | |||
+ | Not supported with WebDAV and S3 protocols. | ||
+ | |||
+ | Effective [[scriptcommand_option|options]]: ''[[scriptcommand_option#failonnomatch|failonnomatch]]'' | ||
XML log element: ''[[logging_xml#chmod|chmod]]'' | XML log element: ''[[logging_xml#chmod|chmod]]'' | ||
Line 12: | Line 20: | ||
===== Examples ===== | ===== Examples ===== | ||
<code winscp> | <code winscp> | ||
+ | chmod 644 index.html about.html | ||
+ | </code> | ||
+ | <code winscp> | ||
+ | chmod 1700 /home/martin/public_html | ||
+ | </code> | ||
+ | <code winscp> | ||
+ | chmod 644 *.html | ||
</code> | </code> | ||
+ | ===== Converting to .NET Assembly ===== | ||
+ | There is no equivalent for ''chmod'' command in [[library|.NET assembly]]. | ||
+ | With [[scp|SCP]] protocol (and [[sftp|SFTP]], if you have a [[shell_session|shell access]]), you can use [[library_session_executecommand|''Session.ExecuteCommand'' method]] to execute ''chmod'' shell command. | ||
+ | With [[ftp|FTP protocol]], you can use ''Session.ExecuteCommand'' method to execute ''SITE CHMOD'' %%FTP%% command. |