Menu  Toggle search  [ ![](https://winscp-
static-746341.c.cdn77.org/assets/images/logos/logo.png?v=7032) WinSCP  Free
SFTP, SCP, S3 and FTP client  for  Windows  ](https://winscp.net/)

  * [ Home ](/eng/index.php)
  * [ News ](/eng/news.php)
  * [ Introduction ](/eng/docs/introduction)
  * [ Download ](/eng/download.php)
  * [ Install ](/eng/docs/guide_install)
  * [ Documentation ](/eng/docs/)
  * [ Forum ](/forum/)

Close

Search

Close

[ Documentation ](/eng/docs/start "Documentation") » [ Features
](/eng/docs/feature_index "Features") » [ Scripting ](/eng/docs/scripting
"Scripting") » [ Script Commands ](/eng/docs/scripting#commands "Script
Commands") »

#  chmod command

[ Changes permissions ](/eng/docs/task_properties) of one or more remote
files.

  * Syntax 
  * Remarks 
  * Examples 
  * Converting to .NET Assembly 

_Advertisement_

##  Syntax

    
    
    chmod <mode> <file> [ <file2> ... ]
    

##  Remarks

` mode ` can be specified as three or four-digit octal number.

Filename can be replaced with [ wildcard ](/eng/docs/file_mask) to select
multiple files.

Not supported with  WebDAV  and  S3  protocols.

Effective [ options ](/eng/docs/scriptcommand_option) : ` [ failonnomatch
](/eng/docs/scriptcommand_option#failonnomatch) `

XML  log element: ` [ chmod ](/eng/docs/logging_xml#chmod) `

##  Examples

    
    
    [chmod](https://winscp.net/eng/docs/scriptcommand_chmod) 644 index.html about.html
    
    
    [chmod](https://winscp.net/eng/docs/scriptcommand_chmod) 1700 /home/martin/public_html
    
    
    [chmod](https://winscp.net/eng/docs/scriptcommand_chmod) 644 *.html

_Advertisement_

##  Converting to .NET Assembly

There is no equivalent for ` chmod ` command in [ .NET assembly
](/eng/docs/library) .

With [ SCP ](/eng/docs/scp) protocol (and [ SFTP ](/eng/docs/sftp) , if you
have a [ shell access ](/eng/docs/shell_session) ), you can use [ `
Session.ExecuteCommand ` method ](/eng/docs/library_session_executecommand) to
execute ` chmod ` shell command.

With [ FTP protocol ](/eng/docs/ftp) , you can use ` Session.ExecuteCommand `
method to execute ` SITE CHMOD ` FTP command.

##  Contribute

![PayPal](https://winscp-
static-746341.c.cdn77.org/assets/images/paypal.svg?v=7032)

[ Donate ](/eng/donate.php)

  * [ $9 ](/eng/donate.php?amount=9&currency=USD&class=S "Donate $9 via PayPal")
  * [ $19 ](/eng/donate.php?amount=19&currency=USD&class=S "Donate $19 via PayPal")
  * [ $49 ](/eng/donate.php?amount=49&currency=USD&class=S "Donate $49 via PayPal")
  * [ $99 ](/eng/donate.php?amount=99&currency=USD&class=S "Donate $99 via PayPal")

![Visa](https://winscp-static-746341.c.cdn77.org/assets/images/card-logo-
visa.svg?v=7032) ![Mastercard](https://winscp-
static-746341.c.cdn77.org/assets/images/card-logo-mastercard.svg?v=7032)
![American Express](https://winscp-
static-746341.c.cdn77.org/assets/images/card-logo-amex.svg?v=7032)
![Other](https://winscp-static-746341.c.cdn77.org/assets/images/card-logo-
unknown.svg?v=7032)

##  User Approved Software

###  Total Downloads:

214,431,241

###  Rating:

4.8  out of  195  reviews

[ SourceForge Review ](https://sourceforge.net/projects/winscp/reviews/)

##  Recommend

  *   * [ Tweet ](https://twitter.com/share)

_Advertisement_

##  Most Read

  * [ Login Dialog – Configuring Session ](/eng/docs/ui_login)
  * [ Using Commander Interface ](/eng/docs/ui_commander)
  * [ Installing SFTP/SSH Server on Windows using OpenSSH ](/eng/docs/guide_windows_openssh_server)
  * [ Authentication Progress ](/eng/docs/ui_authenticate)
  * [ Automate file transfers or file synchronization ](/eng/docs/guide_automation)
  * [ Connect to FTP server or SFTP server ](/eng/docs/guide_connect)
  * [ Bookmark Dialog ](/eng/docs/ui_opendir)
  * [ Set up SSH public key authentication ](/eng/docs/guide_public_key)
  * [ Connecting to Amazon AWS S3 cloud storage ](/eng/docs/guide_amazon_s3)

  *   * 

Last modified:  2023-05-02  by [ martin
](/forum/profile.php?mode=viewprofile&u=2)