Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had a directory on an internal hard-drive that was created in an old Windows 7 install. After re-installing my operating system, when I try to create a new directory inside that directory, I get an Access Denied message. This isn't a protected directory, just a random directory I created at the drive root (that drive was not the C drive in either install).

I tried to take ownership by opening folder properties, going to the Security tab, clicking on Advanced, going to Owner tab, clicking on Edit, selecting my user account, checking Replace owner on subcontainers and objects, and clicking Apply. There were no error messages and I closed the dialogs. I rebooted, checked the owner on that folder and a couple subfolders and it appears to be set correctly. I am still getting an Access Denied message however when trying to create a directory in it.

I've also tried using attrib -R . to remove any possible readonly attribute inside the directory in an admin command prompt but am still unable to create a directory using a non-admin prompt (it does work in an admin prompt).

Is there anything I can do to get write access to that folder and it's subcontents in a non-elevated context without disabling UAC?

share|improve this question
    
Nevermind, it looks like something weird happened due to Sharing. I enabled sharing to my user account, then disabled sharing, and for some reason that gave me write-access to the folder and it's subcontents. –  jeff charles Jun 30 '12 at 20:54
    
If you solved the problem, put in in the Answer field at the bottom, then mark as the correct answer after a couple days –  Canadian Luke Jun 30 '12 at 21:00
    
@Luke - I would've put it in the Answer field except I got a message saying I didn't have enough rep to do that and had to wait 8 hours ... I'm not sure what the preferred thing to do in that case is –  jeff charles Jul 1 '12 at 18:03

2 Answers 2

up vote 2 down vote accepted

Ownership is not enough. You also have to change the folder's ACL to gain write privileges. Looks like enabling sharing fixed these privileges for you. Rebooting is not necessary and the read only flag on a folder does not prevent creating files in it.

share|improve this answer
    
At the time, I don't think my user account was appearing in the permission entries and the "Effective Permissions" suggested my account had full control. Next time (if there is a next time), I will look closer. The reboot and the readonly check was just to rule those out since I wasn't sure what was going on. –  jeff charles Jul 1 '12 at 18:12

Nevermind, it looks like something weird happened due to Sharing. I enabled sharing to my user account, then disabled sharing, and for some reason that gave me write-access to the folder and it's subcontents.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.