Is there a way to run the chmod command on Windows?
9 Answers
No, there's no chmod command in Windows.
Either use Explorer's properties page for the file, or from a command shell use the attrib or cacls commands.
- 21,641
I was going throu the net to get the exact syntax for the same: Found a few HEre is the icacls.exe alternative to chmod 400
Step1: icacls.exe "path+key.pem" /reset
Step2: icacls.exe "path+key.pem" /grant:r "$($env:username):(r)"
Step3: icacls.exe "path+key.pem" /inheritance:r
- 21
- 1
Exactly what do you want to accomplish by using chmod?
Would you be marking some files as executable?
Windows system does not support most (all?) of what chmod is used to do.
You can change read-only and visibility access recursively from the explorer properties.
I was surprised to see CHMOD-Win
But, do be careful with what you get from such sites.
- 7,140
There are some native Win32 ports of Unix commands available. I believe chmod is included, but depending on what you're actually trying to accomplish this might be the wrong tool to use. Perhaps CACLS could be useful (try "cacls" from the command line or search in the windows help).
- 121
In windows 10 powershell I did run the below commands which will be equivalent to chmod
Note: first change the DIR to the folder where you have your .pem file
icacls.exe key.pem /reseticacls.exe key.pem /grant:r "$($env:username):(r)"icacls.exe key.pem /inheritance:r
- 1,267
On post Win2k OSes one sould use iCalcs instead of the older Calcs.
If you need to set-up website permissions, you can try logging using an FTP client like filezilla and Chmod permissions from there.
- 472
Is a console application for windows that can set file premissions ( NTFS file premissions ), and like metioned before attrib can set some limited file attributes.
- 535
Download and install git.
Then
Go to the C drive In Program Files folder, you will find the folder named Git, find usr then bin.
In my case, the location for bin folder was:
C:\Program Files\Git\usr\bin Add this location C:\Program Files\Git\usr\bin to path variables, in system environment variables.
Restart cmd.
Try again
- 4,494