Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


Changing access on a shared directory on NT using Delphi

Posted on 2003-03-17
Medium Priority
Last Modified: 2013-12-04
I am trying to change the group access on a shared directory. I do not have DAPI.dll installed and do not wish to add components to Delphi as the application that creates the share is part of a complex initialization program that needs to be able to be built on multiple machines.
My investigations so far have led me to believe that I need to use Security descriptors(SD), ACL's, and ACE's. I have been looking at the Microsoft specs for SetSecurityDescriptorDACL etc but so far have had little success in extracting the old SD or setting and associating the new SD.
Could someone please point me at a code snippit that I could clone.

Question by:scifibrian
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
  • +1
LVL 12

Expert Comment

ID: 8155134
Can this one help You?

Many Regards
Jorgen Malmgren

:o) Your brain is like a parachute. It works best when it's open

Expert Comment

ID: 8156442
ahhh this is extremely tricky.

I have done this in the past and it was more hassle than it was worth. there are a few VBS scripts on a default server build which have the process listed on how to do this.

however one point I would like to add is that you need to order the ACE's and correctly also. for some time I had alot of difficulty only to find out the order of the ACES in the DACL are very important.

This link shows another application ordering the ACE. The problem being if you set certain permissions before or after other types of permission you can efectively wipe out the previous permission. Therefore you need to ensure you know the correct order to set the perms before you do it programitically.

I have not been able to find the original source I had for this however I will keep looking, thought it would help to know of the problem however.


Expert Comment

ID: 8156444
one more thing has a few scripts which do this with VBS.

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.


Author Comment

ID: 8198920
I have decided that it is better to set the permissions differtly rather than try and change the Security Descriptor after the fact and so am withdrawing this question.

Thank you huckey for your input.

Expert Comment

ID: 8199325
Dear expert(s),

A request has been made to close this Q in CS:

Without a response in 72 hrs, a moderator will finalize this question by:

 - Saving this Q as a PAQ and refunding the points to the questionner

When you agree or disagree, please add a comment here.

Thank you.


Community Support Moderator
Experts Exchange

Accepted Solution

modulo earned 0 total points
ID: 8221606
Saving this Q as a PAQ and refunding the points to the questionner


Community Support Moderator
Experts Exchange

Author Comment

ID: 8222624
The microsoft utility RMTShare would be useful for anyone with a problem similar to this where they want to add a share via a call to a batch file.

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many people tend to confuse the function of a virus with the one of adware, this misunderstanding of the basic of what each software is and how it operates causes users and organizations to take the wrong security measures that would protect them ag…
No security measures warrant 100% as a "silver bullet". The truth is we also cannot assume anything but a defensive and vigilance posture. Adopt no trust by default and reveal in assumption. Only assume anonymity or invisibility in the reverse. Safe…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Suggested Courses

715 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