+ Post New Thread
Results 1 to 10 of 10
Windows Thread, Could anyone explain this behaviour to me? in Technical; I needed to change the permissions of a folder on a number of machines to enable write access by pupils ...
  1. #1

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    25

    Could anyone explain this behaviour to me?

    I needed to change the permissions of a folder on a number of machines to enable write access by pupils and staff.

    If I run the command:

    psexec @"c:\computers.txt" cacls "c:\Program Files\Application" /E /T /C
    /G Users:F

    It loops through all the computers and returns "with error code 2" for each machine, cannot find the file specified.

    But if I run the following command:

    for /F %A in (c:\computers.txt) do psexec \\%A cacls "c:\Program Files\Application" /E /T /C /G Users:F

    It completes the task without issue.

    The computers.txt file is the same in both instances. It just seems strange that I have to circumvent the built-in functionality.

    This is more of a head-scratcher than anything so I was wondering if anyone could explain to me the reason for this.

  2. #2
    BJG
    BJG is offline
    BJG's Avatar
    Join Date
    May 2008
    Location
    Norwich
    Posts
    468
    Thank Post
    89
    Thanked 36 Times in 26 Posts
    Rep Power
    23
    I think you need:

    psexec @c:\computers.txt

    ...without the quotes. (Sounds illogical, but give it a try.)
    Last edited by BJG; 14th December 2010 at 01:57 PM.

  3. Thanks to BJG from:

    fafster (14th December 2010)

  4. #3


    Join Date
    Mar 2009
    Location
    Leeds
    Posts
    7,059
    Thank Post
    232
    Thanked 926 Times in 795 Posts
    Rep Power
    309
    why not use group policy settings to set the permissions?

  5. #4

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    25
    Quote Originally Posted by BJG View Post
    I think you need:

    psexec @c:\computers.txt

    ...without the quotes. (Sounds illogical, but give it a try.)
    Cheers for that. It didn't occur to me to remove the quotes as it was picking up the machine names and looping through them.

    Thinking straight is a lot harder with a cold....

  6. #5

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    25
    Quote Originally Posted by sted View Post
    why not use group policy settings to set the permissions?
    I didn't realise you could set NTFS permissions with group policy. Care to show me how?

  7. #6
    Jon
    Jon is offline
    Jon's Avatar
    Join Date
    May 2006
    Location
    Norfolk
    Posts
    328
    Thank Post
    32
    Thanked 59 Times in 43 Posts
    Rep Power
    24
    Computer Configuration - Windows Settings - File System:- Right click - add file.

    You can set file and folder security from here.

  8. Thanks to Jon from:

    featured_spectre (14th December 2010)

  9. #7

    featured_spectre's Avatar
    Join Date
    Nov 2008
    Posts
    12,503
    Thank Post
    1,684
    Thanked 2,054 Times in 1,491 Posts
    Blog Entries
    2
    Rep Power
    464
    Jon is right, but be warned as it applies to all machines globally within the policy, not just a select few within an OU.

  10. #8

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    25
    Quote Originally Posted by Jon View Post
    Computer Configuration - Windows Settings - File System:- Right click - add file.

    You can set file and folder security from here.
    The DC is 2003. Is there an ADM that I can download to enable this functionality?

  11. #9
    Jon
    Jon is offline
    Jon's Avatar
    Join Date
    May 2006
    Location
    Norfolk
    Posts
    328
    Thank Post
    32
    Thanked 59 Times in 43 Posts
    Rep Power
    24
    You don't need an ADM, this policy is native to a 2003 AD group policy

  12. Thanks to Jon from:

    fafster (15th December 2010)

  13. #10

    Join Date
    Nov 2006
    Posts
    998
    Thank Post
    132
    Thanked 58 Times in 51 Posts
    Rep Power
    25
    Quote Originally Posted by Jon View Post
    You don't need an ADM, this policy is native to a 2003 AD group policy
    It's under security settings. For the life of me I just could not see it.

    I couldn't find my car keys this morning, either, so I don't think there's much hope for me.



SHARE:
+ Post New Thread

Similar Threads

  1. [Website] Can someone explain this?
    By somabc in forum Jokes/Interweb Things
    Replies: 1
    Last Post: 25th November 2009, 12:45 PM
  2. [News] Could You Explain Programming Please
    By mattx in forum Jokes/Interweb Things
    Replies: 4
    Last Post: 25th November 2008, 07:16 PM
  3. Please Explain this!
    By rush_tech in forum Hardware
    Replies: 5
    Last Post: 21st January 2008, 06:22 PM
  4. explain this one...
    By mrbios in forum Wireless Networks
    Replies: 10
    Last Post: 12th December 2007, 11:50 AM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •