How to change permissions on the share from command line?

Posted on 2005-05-13
Last Modified: 2010-03-18
Is ther a way to change permisions on the network share folder from admin PC command line?

This is windows 2000/2003 enviroment.
Thank you
Question by:howei
    LVL 82

    Accepted Solution

    Install the W2k3 Resource Kit Tools on an XP/W2k3 machine (just because they're useful), and download and install the subinacl tool afterwards (included in the ResKit Tools, but buggy, hence the update).

    Windows Server 2003 Resource Kit Tools

    SubInACL (SubInACL.exe)

    Then use subinacl.exe to change the share permissions (works for other stuff, too). Have a look at the ResKit help for detailed information.
    The syntax should be
    subinacl /share \\SomeServer\SomeShare /grant=Domain\Username=F
    (or R, or C)
    The same works with /revoke and /deny instead of /grant

    As usual: Try it on a test share first.
    LVL 7

    Expert Comment

    The command line tool CACLS will also do this this - it is available by default on XP/2003 (not sure about 2000).

    Subinacls give you more functionality
    LVL 82

    Expert Comment

    cacls will only handle NTFS permissions, not share permissions.

    Author Comment

    Cacls works only localy?
    LVL 82

    Expert Comment

    cacls works on network folders as well; something like
    cacls \\SomeServer\SomeShare\Some\Subfolder /e /g SomeGroup:f
    will change the NTFS permissions (but not the share permissions!) of the subfolder.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Sometimes you might need to configure routing based not only on destination IP address, but also on a combination of destination IP address (or hostname) and destination port number. I will describe a method how to accomplish this with free tools. …
    Trying to figure out group policy inheritance and which settings apply where can be a chore.  Here's a very simple summary I've written which might help.  Keep in mind, this is just a high-level conceptual overview where I try to avoid getting bogge…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now