Solved

Perminssions staying applied to Files or Sub Directories.

Posted on 2008-10-13
1
200 Views
Last Modified: 2012-05-05
I have a problem with the xcacl script. It seems to give the designated user Full Control of their main Home directory, subfolders and files with in that directory. But then when I run the script to give them Ownership, it removes the permissions of full control, while giving ownership.

Here's what I'm doing.
So I have a directory called sally, and in that directory is a desktop directory, directory 1, directory 2 and so on. Also in the Directory called sally is users .doc and excel files.
The name Sally reflect the users AD log in name.
I cd to the s:/dfsshared/home/acme  directory, in that directory is my users Home directory including sally's.
once in the directory, I run the command cscript.exe /h:cscript
I then run the bat command from with in that directory.  
this is the bat file script.
@ECHO OFF
FOR /D %%f IN (*) DO "C:\WINDOWS\scripts\XCACLS.vbs" %%f /t /g domainname\%%f:f /t /e

As I said it looks like it gives them full control to the main directory and sub directories.

I then run this script...
@ECHO OFF
FOR /D %%f IN (*) DO "C:\WINDOWS\scripts\subinacl.exe" /subdirectories "%%f" /setowner="domainname\%%f"

Once I run the ownership command, it wipes out the inheriteted permissions on the sub directories and files, but gives ownership.

Any tips or idea how to do both. give them Full Control, and then Ownership of all files and directories? the users need ownership in order for the desktop redirect to work

Thanks

OSXFreak.
 


0
Comment
Question by:OSXFreak
[X]
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
1 Comment
 
LVL 21

Accepted Solution

by:
AmazingTech earned 500 total points
ID: 22714120
Can you give them ownership then give them full control?

I have found that users taking ownership retains the users permissions but when giving ownership to a user permissions are often removed.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Need help Creating PowerShell Script 4 67
[switch] $NoInheritance - Powershell Code 5 27
add if statement powershell 8 58
Move files based on file names? 8 70
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

752 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