Trusted answers to developer questions

What is chmod in windows?

Get Started With Data Science

Learn the fundamentals of Data Science with this free course. Future-proof your career by adding Data Science skills to your toolkit — or prepare to land a job in AI, Machine Learning, or Data Analysis.

chmod is a command in Unix and Unix-like operating systems that are used to change the access permissions of files and directories. The name is an abbreviation of change mode, which does not exist in Windows OS. However, there are alternative ways to change access permissions in windows. You can accomplish this by using:

  1. Graphical interface
  2. Command-line with ICACLS

Using Graphical Interface

To change object access properties you can right-click the object, go into properties, and then security. If you’re signed in as an administrator, you’ll be able to modify access properties such as the read, write, and execute permissions.

right-click object > properties > security

Command-line with ICACLS

Integrity Control Access Control List or ICACLS is used to view and modify security descriptors on folders and directories.

The syntax for ICACLS is:

icacls <FileName> [/grant[:r] <Sid>:<Perm>[...]] [/deny <Sid>:<Perm>[...]] [/remove[:g|:d]] <Sid>[...]] [/t] [/c] [/l] [/q] [/setintegritylevel <Level>:<Policy>[...]]

icacls <Directory> [/substitute <SidOld> <SidNew> [...]] [/restore <ACLfile> [/c] [/l] [/q]]

You can use ICACLS to grant full (F), modified (M), read and execute (RX), read only (R ), or write only (W) access. Visit the official documentation for a complete description of the command.

RELATED TAGS

linux
unix
command line
windows
Copyright ©2024 Educative, Inc. All rights reserved
Did you find this helpful?