Setting Folder Permissions from command prompt!

CACLS: Change Access Control List

C:\> cacls foldername /e /p Username:F (Full Permission)

C:\> cacls foldername /D Username (to deny)

C:\> cacls foldername /e /p username:F (full control) (e:edit) (p:permission)

C:\> cacls “Foldername” /grant “Username”:F (full control)

C:\> cacls C:\Shared /e /p  Everyone:F (to create a permission on shared folder)

where /e is to preserve old permissions, /p is to add new permissions

F: stands for Full control

R: Read

W: Write

C: Change

If you don’t include /e the permissions assigned will be the only permissions on the file / directory.

To get the info of all files and folder inside the directory below is the PS command

PS C:\>Dir | Get-Acl (list all the permission on the shared folder)

To delete a share from command prompt –> net share Foldername /delete

4 replies
  1. bursa escort
    bursa escort says:

    Hello there. I found your blog by means of Google at the same time as looking for a comparable subject, your web site came up. It seems great. I have bookmarked it in my google bookmarks to come back then. Jill Brandtr Bowman

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *