none
Change Share permission commandline RRS feed

  • Question

  • Using  cacls "G:\Test" /g Everyone:f will only change Security Permission of the folder.

    How to change Share permission in commnadline without yes/no prompt? Tnanks.


    • Edited by Ian3 Thursday, November 7, 2013 10:00 PM
    Thursday, November 7, 2013 9:58 PM

Answers

  • Use:

    echo y|cacls "G:\Test" /g Everyone:f

    Don't leave a space between y, | and cacls.


    Arnav Sharma | Facebook | Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by Ian3 Friday, November 8, 2013 3:53 PM
    Friday, November 8, 2013 9:33 AM
    Moderator

All replies

  • Use:

    echo y|cacls "G:\Test" /g Everyone:f

    Don't leave a space between y, | and cacls.


    Arnav Sharma | Facebook | Twitter Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    • Marked as answer by Ian3 Friday, November 8, 2013 3:53 PM
    Friday, November 8, 2013 9:33 AM
    Moderator
  • Do not try this at home. This will only change the NTFS permissions not share permissions.  It will also over write the existing permissions.
    Wednesday, July 3, 2019 12:20 PM