No announcement yet.

Set Permissions with Batch File?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Set Permissions with Batch File?

    Hey there, I have quite a few workstations that need access to one file that is in their Windows directory. Unfortunately the file is only set for administrator access. Is there an easy way to add into my existing login script a command to set the permissions to file file for everyone with full access?

    Thanks for any help in advance!
    - Kevin Neberman

  • #2
    Re: Set Permissions with Batch File?

    Use a computer Startup Script for this,.

    two options for the startup script,
    - xcopy /O /D /y a modified file to the folder
    - use xcacls to modify NTFS permissions


    This posting is provided "AS IS" with no warranties, and confers no rights.


    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts


    • #3
      Re: Set Permissions with Batch File?

      You could use group policy object setting if you are operating in an Active Directory environment by using the file system node in the Computer Configuration, then link the group policy object to site/domain/organisational unit containing your computer objects. The group policy settings you require is:

      Computer Configuration>Windows Settings>Security Settings>File System

      Alternatively, you could use cacls.exe using a command similar to below which edits the ACL of the filename specified granting the everyone security group Full Control permissons.

      cacls filename /e /g everyone:f
      MCSA 2000/2003


      • #4
        Re: Set Permissions with Batch File?

        I went ahead and did it threw GP but after I add it and then do a gpupdate on the workstation the permissions have not been changed.


        • #5
          Re: Set Permissions with Batch File?

          Following a refresh of the computer configuration settings on the workstation have you performed a restart as the group policy object settings specified will only be a applied on startup?

          If you have performed a restart, run gpresult to see if the group policy you have created has been applied. If you require further information run group policy results from the group policy management mmc specifying computer configuration settings for one workstation to which the group policy object is applied, this will list any conflicts and/or errors.
          MCSA 2000/2003