Problem with Changing Access Control of a directory

Discussion in 'Windows 8 Help and Support' started by Vivek, Apr 24, 2016.

  1. Vivek

    Vivek New Member

    Joined:
    Apr 24, 2016
    Messages:
    4
    Likes Received:
    1
    In order to make one of my directory secure, I changed the access control of the directory to none using the command
    Code:
    cacls DirName /e /p everyone:n
    .

    But when I tried to grant the full access using
    Code:
    cacls DirName /e /p everyone:f
    , it gives me Access Denied Error. Also, I am unable to open the folder. Any help would be appreciated.

    Thanks
    ~Ive
     
  2. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,408
    Likes Received:
    362
    Set it back to full from an elevated command prompt
     
  3. holdum333

    holdum333 Banned

    Joined:
    Mar 27, 2016
    Messages:
    1,244
    Likes Received:
    147
  4. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,408
    Likes Received:
    362
    That is true, but if he's using cacls I would imagine he knows how. I looked at that guide, it's actually missing one of the easier ways to run anything as administrator. If you hold Shift + ctrl and left click your executable and it will run it as admin.
     
  5. holdum333

    holdum333 Banned

    Joined:
    Mar 27, 2016
    Messages:
    1,244
    Likes Received:
    147
    Cool! My thinking is we have a lot of visitors that log on the forum and don't post, but they do read the threads. My reply was for them.
    I don't mean to step on you, but some times your replies are not always for a newbie.;)
    I follow all your replies and you are very knowledgeable,:worship: but some times maybe you could make it a little more simple for the newbie users.
    I'm just the opposite, I'm to windy.:rofl:
     
  6. Vivek

    Vivek New Member

    Joined:
    Apr 24, 2016
    Messages:
    4
    Likes Received:
    1
    Hi @Neemobeer,
    Thanks for the help. But that didn't worked because I was executing the commands in elevated cmd.
    Below is the screenshot of what I ran:
    [​IMG]


    @holdum333 being a web developer I know a bit about those shits :p
     
  7. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,408
    Likes Received:
    362
    Try taking ownership of the folder first with takeown /F <directory> then try assigning permissions. If that doesn't work...
    • download psexec PsExec
    • Open an elevated command prompt in the directory psexec is
    • Type psexec -s -h -i cacls <pathtodirectory> /e /p administrators:f
    This should use the SYSTEM account to assign full access to the administrators group
     
    Vivek and holdum333 like this.
  8. holdum333

    holdum333 Banned

    Joined:
    Mar 27, 2016
    Messages:
    1,244
    Likes Received:
    147
    Good for you!:p:pYou shouldn't need @Neemobeer's help then! Good luck !!
     
  9. Vivek

    Vivek New Member

    Joined:
    Apr 24, 2016
    Messages:
    4
    Likes Received:
    1
    @Neemobeer Thanks,
    Taking ownership worked. :)

    @holdum333 Nobody's perfect. And that's why one should never hesitate in asking for help ;)


    Thanks guys!
     
    holdum333 likes this.
  10. holdum333

    holdum333 Banned

    Joined:
    Mar 27, 2016
    Messages:
    1,244
    Likes Received:
    147
    Good for you Vivek! I'm glad it worked out for you. @Neemobeer is my idol. I think he has 3 or 4 degrees and working on another one.
    My advice about CMD was for the guests that read these threads, not for you. Come back often and share your knowledge here on the forum.
    Thanks for your feed back. I'm sure @Neemobeer will be pleased that it worked out for you!:up:
     
  11. holdum333

    holdum333 Banned

    Joined:
    Mar 27, 2016
    Messages:
    1,244
    Likes Received:
    147
  12. Vivek

    Vivek New Member

    Joined:
    Apr 24, 2016
    Messages:
    4
    Likes Received:
    1
  13. holdum333

    holdum333 Banned

    Joined:
    Mar 27, 2016
    Messages:
    1,244
    Likes Received:
    147
    :up: @Vivek Right back at you friend! Welcome to the forum!
     
  14. Neemobeer

    Neemobeer Windows Forum Team
    Staff Member

    Joined:
    Jul 4, 2015
    Messages:
    2,408
    Likes Received:
    362
    I'll tell you straight up, I'm almost never offended or angry at anyone for any reason so don't feel like your stepping on toes. I have been drinking a bit, but I'll try to explain Windows ACL model a bit. Windows uses the DAC acl model which is Discretionary Access Control. This means that those who own a given file or directory can give any access to anyone. If you don't have any permissions you can still take ownership of a file or directory provided you are a member of the administrators group. Once you have ownership you can give access to yourself or anyone. Hopefully that clears up why taking ownership resolved this.
     
    ussnorway likes this.
  15. holdum333

    holdum333 Banned

    Joined:
    Mar 27, 2016
    Messages:
    1,244
    Likes Received:
    147
    Hi friend! This is all above my pay grade. My question was is this any good? I have a couple drinks every night myself and I'm never offended or angry either. I glad to get all the help and suggestions I can get. I may not remember them, but some of it sticks to this old brain!:rofl:
    Add "Take Ownership" to Explorer Right-Click Menu in Windows
     
    #15 holdum333, Apr 25, 2016
    Last edited: Apr 25, 2016
  16. BIGBEARJEDI

    BIGBEARJEDI Honorable Member
    Premium Supporter

    Joined:
    Jan 28, 2013
    Messages:
    1,784
    Likes Received:
    214
    Good thread here guys!

    @neemo; nice concise explanation of DAC there.:D

    <<<BIGBEARJEDI>>> :nerdie:
     

Share This Page

Loading...