Results 1 to 2 of 2

Thread: Changing File System Permissions and Ownership in Powershell

  1. #1
    David Eisner Guest

    Changing File System Permissions and Ownership in Powershell

    I'd like to change NTFS file system permissions using Powershell, both
    at the command line and from a Powershell script.

    I come from the Unix world, where it's pretty straightforward: To
    change ownership, you use the 'chown' command, and to change
    permissions, you use either 'chmod' or 'setfacl'.

    How would I do the same thing in Powershell? I'd like to be able to
    do this locally (on a Windows Server 2003 box), and hopefully remotely
    (from a Windows XP client, say).

    Googling around, I see many different discussions threads, with
    conflicting information about how you might do it (try this script I
    wrote, download this utility, etc.), or whether it's even possible to
    change the owner to a non-Administrative user account using anything
    other than the security tab in the GUI. I'm surprised such a basic
    operation is such a fertile topic for discussion and debate.

    Powershell is pretty cool, and I'm hoping I can use it to accomplish
    my task.

    Thanks in advance!

    -David

  2. #2
    Joe Acosta Guest

    Re: Changing File System Permissions and Ownership in Powershell

    David,

    From a regular shell (not power shell), type xcacls /? and see if the
    options available work for you.

    For remotely executing commands on systems, take a look at psexec.exe which
    is included in pstools.zip. Note that there are several "unix-y"
    (unix-ish?) utilities within the zip file. Download for free at
    http://technet.microsoft.com/en-us/s.../bb896649.aspx

    Joe A


    "David Eisner" <deisner@gmail.com> wrote in message
    news:909c9122-8d40-4b4c-947d-e36093e556ae@l76g2000hse.googlegroups.com...
    > I'd like to change NTFS file system permissions using Powershell, both
    > at the command line and from a Powershell script.
    >
    > I come from the Unix world, where it's pretty straightforward: To
    > change ownership, you use the 'chown' command, and to change
    > permissions, you use either 'chmod' or 'setfacl'.
    >
    > How would I do the same thing in Powershell? I'd like to be able to
    > do this locally (on a Windows Server 2003 box), and hopefully remotely
    > (from a Windows XP client, say).
    >
    > Googling around, I see many different discussions threads, with
    > conflicting information about how you might do it (try this script I
    > wrote, download this utility, etc.), or whether it's even possible to
    > change the owner to a non-Administrative user account using anything
    > other than the security tab in the GUI. I'm surprised such a basic
    > operation is such a fertile topic for discussion and debate.
    >
    > Powershell is pretty cool, and I'm hoping I can use it to accomplish
    > my task.
    >
    > Thanks in advance!
    >
    > -David




Similar Threads

  1. Changing a Directory’s Ownership in linux
    By Abagail in forum Operating Systems
    Replies: 6
    Last Post: 29-05-2011, 08:09 PM
  2. Can't Change Permissions or Ownership on an external drive
    By Alibamu in forum Portable Devices
    Replies: 8
    Last Post: 25-09-2010, 09:53 AM
  3. No access External Hard Drive in Ownership & Permissions
    By Its_Shaili in forum Portable Devices
    Replies: 3
    Last Post: 18-09-2010, 02:13 PM
  4. Powershell script to parse system logs in text file
    By SADIQ in forum Operating Systems
    Replies: 2
    Last Post: 02-06-2009, 07:05 PM
  5. Replies: 1
    Last Post: 29-07-2007, 08:01 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,622,761.83889 seconds with 17 queries