Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 220
  • Last Modified:

How to change permissions on the share from command line?

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
0
howei
Asked:
howei
  • 3
1 Solution
 
oBdACommented:
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
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en

SubInACL (SubInACL.exe)
http://www.microsoft.com/downloads/details.aspx?FamilyID=E8BA3E56-D8FE-4A91-93CF-ED6985E3927B&displaylang=en

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.
0
 
sweatbeastCommented:
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
0
 
oBdACommented:
cacls will only handle NTFS permissions, not share permissions.
0
 
howeiAuthor Commented:
Thanks!
Cacls works only localy?
0
 
oBdACommented:
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.
0

Featured Post

Restore individual SQL databases with ease

Veeam Explorer for Microsoft SQL Server delivers an easy-to-use, wizard-driven interface for restoring your databases from a backup. No expert SQL background required. Web interface provides a complete view of all available SQL databases to simplify the recovery of lost database

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now