Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

how to delete C folder items on SBS 2008

Posted on 2011-09-15
18
Medium Priority
?
504 Views
Last Modified: 2012-06-27
I restored a C drive folder as a test and now want to delete it, but I keep getting "you need permission to perform this action". I am logged on as administrator on our SBS 2008.  What do i need to do to be able to delete this C drive folder that is actually on E drive? It is not the actual C drive and it isn't even actually named C drive, it is simply a restore of the C drive from a backup, as a test.
0
Comment
Question by:rodynetwork
  • 10
  • 8
18 Comments
 
LVL 12

Expert Comment

by:marcustech
ID: 36543326
To take ownership of the folder, follow this guide, then you should find you have the required access to delete the folder - if you need more detailed instructions post back.
0
 

Author Comment

by:rodynetwork
ID: 36543480
I don't know.  My "administrator" name is listed as an owner.  For grins, I tried "replace owner on subcontainers and objects" but still get the "you need permission to perform this action".
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36543558
Try this:
TAKEOWN /F <directory> /A /R /D Y >> C:\takeown_log.txt
(the last bit just logs the "takeown" command's output to a textfile so i can have a look if it fails)
From the command line to get ownership of the directory (remembering to run CMD as administrator). If that still fails, there's a couple of other options the - one would be to boot to a Live CD of some sort (hiren's boot CD, Ubuntu, knoppix) and delete the folder from there - it might also be worth trying a boot in safe mode and then take ownership from there - appreciate with it being an SBS box downtime might be hard to come by...
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:rodynetwork
ID: 36543648
the folder I need to take ownership of is named-

test recovery of TheC

It is on the E drive.  Can you post that cmd again with that? I ran the one you posted and it gave "the system cannot find the file specified"
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36543669
TAKEOWN /F "E:\test recovery of TheC" /A /R /D Y >> C:\takeown_log.txt
0
 

Author Comment

by:rodynetwork
ID: 36543875
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\Windows\system32>TAKEOWN /F "E:\test recovery of TheC" /A /R /D Y >> C:\takeo
wn_log.txt

ERROR: The filename, directory name, or volume label syntax is incorrect.

C:\Windows\system32>
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36544265
Can you post the result from running "dir" from the e: drive? Sounds like that folder name is wrong.
0
 

Author Comment

by:rodynetwork
ID: 36544592
I don't know how to run "dir" from the e: drive.  How do I do that?
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36544659
Open a cmd prompt and enter "e:"   Press enter.
The start of the command line should change to E:>
type "dir"  Press enter.
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36544720
Sorry, from E:> please run:

dir > c:\dire.txt

This will create a text file called 'dire.txt'on the C:\ drive.  Post that here.  Thanks.
0
 

Author Comment

by:rodynetwork
ID: 36544792
Volume in drive E is America
 Volume Serial Number is 20AB-0B3D

 Directory of E:\

03/02/2011  04:34 PM    <DIR>          Joe Backup
08/22/2010  09:33 PM    <DIR>          IS_Unhip_Directories
09/10/2011  10:19 AM    <DIR>          Joe Share
06/06/2011  08:13 PM    <DIR>          JJMasterDatabase
09/15/2011  09:43 AM    <DIR>          test recovery of TheC
03/17/2011  03:46 PM    <DIR>          WSUS
               0 File(s)              0 bytes
               6 Dir(s)  166,278,037,504 bytes free
0
 

Author Comment

by:rodynetwork
ID: 36544813
Where do you learn all this?  The dir>c:/dire.txt is wack.
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36544927
Hmm, this is not expected behaviour.  The first error (ERROR: The filename, directory name, or volume label syntax is incorrect.) indicates that there is no folder  E:\test recovery of TheC
The dir output indicates that there is.

I shall have to consider this matter for a period of time.
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36544980
Just for the hell of it, try:

del /f "E:\test recovery of TheC"

from an elevated command prompt.

Where do you learn all this?
All the info is freely available on the net.   There's a cmd A-Z here.  As you browse the forums and see how other people use cmd you'll pick up which cmds are more powerful or useful, then you can just run

[command] /?

to get the syntax.  The >> trick is pretty universal, if the command supports piping the output to a text file then that's the way to do it.
0
 

Author Comment

by:rodynetwork
ID: 36545034
I ran del /f "E:\test recovery of TheC"  from cmd with C:\Windows|System32>. When I gave it del /f "E:\test recovery of TheC" it came back with "Are you sure Y/N? and I put y and enter and it came back with C:\Windows|System32>.  I then check the E drive and that folder is still there.  Should I just try booting with Ubuntu and delete the file while SBS is offline?
0
 
LVL 12

Expert Comment

by:marcustech
ID: 36546580
Certainly there is no harm in trying this approach, so long as you don't get carried away deleting things ;)
0
 
LVL 12

Accepted Solution

by:
marcustech earned 2000 total points
ID: 36548413
Just out of curiosity (from where we stand now, your easiest option to get rid of the folder is probably a linux liveCD), can you browse the contents of the restored folder? And can you delete or rename individual files within it if so?
0
 

Author Comment

by:rodynetwork
ID: 36548927
I used Ubuntu last night to delete.  That was a great suggestion.  Thanks! To further clarify for all, I had tested my backup and restored the C into a folder named TheC on my E drive.  I think in the future when I want to test a restore, I will do that to an external drive rather than my E.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the event you manage a Small Business Server 2003, and you are audited for PCI compliance, there are several changes you must make in order to pass the audit. I can take no credit for discovering any of these fixes or workarounds, but there is no…
The SBS 2011 release date (RTM) is supposed to be around Christmas, 2011.  This article is a compilation of my notes -- things I have learned first hand.  The items are in a rather random order, but I think this list covers most of what is new and d…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month12 days, 3 hours left to enroll

564 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question