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

x
?
Solved

Access is denied when deleting

Posted on 2004-11-21
32
Medium Priority
?
6,260 Views
Last Modified: 2010-08-05
I'm getting an 'access is denied' from time to time when trying to delete folders in Windows 2003.
I'm loggied in as admin and i change permissions (full control for everyone in all subfolders too) & ownership for admin (for all subfolders too).
Still access is denied.
Any clues what i am missing here ?
0
Comment
Question by:Lieven Embrechts
32 Comments
 
LVL 10

Expert Comment

by:NetworkArchitek
ID: 12640251
Hi Lieven_Embrechts,
Well are files inside these folders open? If they are shared is anyone using them on the network; do you have any programs opening them on the server?

Cheers!
0
 
LVL 7

Expert Comment

by:shahrial
ID: 12640805
Besides NetworkArchitek good comments, do check that that when taking ownership, this checkbox is ticked.
"Replace owner on subdirectories and objects". This will ensure that any block inheritance setting is overwritten with the new owner set in the change owner to: list.
...;-)
0
 
LVL 15

Expert Comment

by:Cyber-Dude
ID: 12642739
You can research what is occupying that folder or file you are trying to copy by using the following FileMon application by Sysinternals:
http://www.sysinternals.com/ntw2k/source/filemon.shtml

Download this utility to browse what application usng what files...

Good luck

Cyber
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:JoshPowell
ID: 12644900
Usually this is caused by a proogram running that is accessing the files, try restarting the computer, and if that doesn't work, try rebooting in safe mode (hold F8 during startup, chose safe mode) and then you should be able to delete the files.


Josh
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12647550
There are no open files in those clutter folders.
(files saved in internet explorer)
Imho it's a matter of file naming.
First i get the warning: contains items whose name is too long for the recycle bin.
Delete immediatly ? yes
canot delete news;sec=news;artid:602163;pos=bottom;sz=468x60;tile=2;ord=871047248_files: Acess is denied.
So somehow these kind of long filenames got saved but can't be deleted.
0
 
LVL 3

Expert Comment

by:JoshPowell
ID: 12647853
Try renaming the files first :)

Did you try rebooting in safe mode?


Josh
0
 

Expert Comment

by:fishs
ID: 12648271
Are you connecting via a share.  Verify the share permission and the security permission are open correctly.
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12648600
I tried rebooting in safe mode, didn't work.
i didn't like this solution anyway as it would mean that sometimes a reboot in safe mode would be the only way to delete some files, that doesn't sound like a serious server OS.

It has nothing to do with open files, file security, shares.
The folders & files that i cannot delete are moved to a local unshared folder c:\clutter
Cfr detailed error sample in my comment.

IMHO it has to do with (folder or file) name length or characters that got in the filename but not really allowed.
0
 
LVL 3

Expert Comment

by:JoshPowell
ID: 12648640
Since it doesn't work in safe mode, you are either trying to delete critcal windows files (probably not ;) ) or it means that its not caused by an access violation.

So your guess on the caracters in the file name might be correct, did you try renaming the file?


Josh
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12648717
It's solved and it's tricky ;-)
See the directory tree that i attached at the bottom.
As you can see the tree is quite deep and the folders at the bottom of the tree are quite long.
When i move the folder 'IN' directly under 'restore', so i move it a number of tree-branches higher, suddenly i can delete the folders.
So if the tree depth is quite high and/or the folder names quite long, it's impossible to delete the bottom folders.
When i decrease the tree depth or move the long folder names higher, it becomes possible again to delete.
It has to be some Win2003 limit i'm bumping into ...
Anyone knows which one ?


C:\clutter>tree

C:.
└───restore
    └───Backup Set L
        └───Documents and Settings
            └───lieven
                └───Desktop
                    └───test
                        └───Information
                            └───IN
                                ├───ATM and Alternatives in the Wide Area Backbo
ne   (Network Magazine Article)
                                │   ├───ATM and Alternatives in the Wide Area Ba
ckbone (1)    (Network Magazine Article)_files
                                │   ├───ATM and Alternatives in the Wide Area Ba
ckbone (2)    (Network Magazine Article)_files
                                │   ├───ATM and Alternatives in the Wide Area Ba
ckbone (3)    (Network Magazine Article)_files
                                │   ├───ATM and Alternatives in the Wide Area Ba
ckbone (4)    (Network Magazine Article)_files
                                │   ├───ATM and Alternatives in the Wide Area Ba
ckbone (5)    (Network Magazine Article)_files
                                │   ├───ATM and Alternatives in the Wide Area Ba
ckbone (6)    (Network Magazine Article)_files
                                │   └───ATM and Alternatives in the Wide Area Ba
ckbone (7)    (Network Magazine Article)_files
                                ├───Lucent and TeraBeam to launch fibreless netw
ork   (from vnunet.com)_files
                                │   └───news;sec=news;artid=602163;pos=bottom;sz
=468x60;tile=2;ord=871047248_files
                                ├───Protocol helps stretch IPv4 addresses (RSIP)
    (by Network World)_files
                                │   └───0117tech_files
                                │       └───techprimers;top=;pos=right;sz=120x24
0;tile=2;ord=102401_files
                                ├───VoIP to carry 'bandwidth tax'    (Network Wo
rld News Article)_files
                                │   └───1030voip_files
                                │       └───dailynews;top=;pos=right;sz=120x240;
tile=2;ord=115903_files
                                └───Wonderful World of Linux 2.4 (Final Draft)
  (on Linux Today)_files
                                    └───site=internetcom&PagePos=10&size=125x125
&channel=linux&content_site=www.linuxtoday_files

C:\clutter>
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12648738
Sorry, my tree uses extended characters which translate pretty unreadable on the web.
I should've used the asci option in the tree command to make it more readable...
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12648773
Even renaming doesn't work an long folder names in a deep directory tree.
Access denied !
Sigh. Dumb windows server OS ?
0
 

Expert Comment

by:war6763
ID: 12650666
You might be trying to delete something that's in use, you might want to try and boot up in Safe Mode so that nothing is running.  YOu shouldn't have any problems there.
0
 
LVL 7

Expert Comment

by:shahrial
ID: 12651311
It's the filename limitation issue i guess. NTFS supports file names with a maximum of 255 characters.
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12652167
>It's the filename limitation issue i guess. NTFS supports file names with a maximum of 255 characters.

Including the complete tree structure then ?
I can delete the long named directory when in a small directory structure,
i can't delete when in a deeper directory structure.
Where are the experts to explain ?
0
 
LVL 15

Expert Comment

by:Cyber-Dude
ID: 12652346
If you want a more than 255 Chars long support, you will have to use another software to manage your files and folders (and there are a few out there...)

Cyber
0
 
LVL 3

Expert Comment

by:JoshPowell
ID: 12653996
I am not sure if the 255 chars limit is including the tree structure, but I do know that the tree structure can't be but so long.. so it just might be :)

Josh
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12654034
fyi: sum of the length of all folders (including the last long one) is 140 to 150 characters.
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12654081
> If you want a more than 255 Chars long support, you will have to use another
> software to manage your files and folders (and there are a few out there...)

examples ?
0
 
LVL 4

Expert Comment

by:Caeser_Augustus
ID: 12664056
You had me hooked. I've tried looking for an NTFS specification but the nearest that I got was this for 95:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q148754

which basically says that the limit is 259 characters for the path counting from a point. I would love if someone finds a spec for NTFS regarding this.
0
 
LVL 15

Expert Comment

by:Cyber-Dude
ID: 12666691
OK
Try to use Knoppix to manage your drive in terms for file and directory management. Access them and rename them to a proper accessable formats.

Links:
Knoppix:
http://www.knoppix.net

NTFS management using Knoppix:
http://linux-ntfs.sourceforge.net/man/ntfsprogs.html

Copying files using Knoppix:
http://linux-ntfs.sourceforge.net/man/libntfs-gnomevfs.html

Hope that helpes...

Cyber
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12667547
I'm not interested in Knoppix.
Would love to find someone who can tell me why i can't remove a long folder in a directory tree 8 deep and i can delete the folder in a smaller directory tree.
0
 
LVL 15

Expert Comment

by:Cyber-Dude
ID: 12667601
Hmmm...
try to run chkdsk within recovery console, let Windows 'fix' the name to be suitable... This should allow you get in to the folder after new startup...

Cyber
0
 

Expert Comment

by:Death-Speak
ID: 12670416
Try opening a command prompt and using the del command:

C:\> del c:\clutter

It'll ask you of you're sure, and should remove all file in the directory. Warning though, this is permanent, there is no recycle option here.

DS
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12672559
no, chkdsk and del-command don't work...
0
 
LVL 15

Accepted Solution

by:
Cyber-Dude earned 2000 total points
ID: 12672643
OK
Found two articles and I hope they will help you in dealling with this:
One deals with How to Remove Files with Reserved Names in Windows XP; And from the looks of it, it is a simpler solution then I was first estimated:
http://support.microsoft.com/?kbid=315226

The second link deals with Configure File Name Character Translation for NFS to Support the UNIX-to-Windows Migration; and sience I saw a hint of a Linux 2.4 kernel existanse on your system, I thought it to be a benefit:
http://support.microsoft.com/?kbid=324218

Good luck

Cyber
0
 
LVL 9

Author Comment

by:Lieven Embrechts
ID: 12690175
correct, the syntax 'RD \\.\drive letter:\path\directory name' bypasses internal checks on special characters, length & reserved names
and makes it possible to solve this problem quite easely.

0
 

Expert Comment

by:vj23us
ID: 12801912
You might want to defrag your hard disk and reboot.  I had a few files that wouldn't delete, but after defragmenting and cleaning up my recycle bin I was able to delete them normally.
0
 

Expert Comment

by:bharatpanthee
ID: 12826779
i don't get the my answer
0
 

Expert Comment

by:lafrentg
ID: 12896056
I had a similar problem about a week ago where I would take ownership and had full permissions.  I found that some of the files still had the improper ownership.  Check the permissions and owernship on some of the files that are nested in some of sub directories.
0
 

Expert Comment

by:td57
ID: 12907346
I've had some luck using the DELTREE.EXE from a Windows 95 system to delete 'undeletable' directories on 2000, and XP pro. It's permanent though.
0
 

Expert Comment

by:td57
ID: 12907365
Also if it's a length problem, you might be able to "susbt" to a level down from the root and delete from the new drive letter.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

The article covers five tools all IT professionals should know about, as they up productivity by a great deal!
In this tutorial, we’re going to learn how to convert Youtube to mp3 for Free. We'll show you how easy it is to make an mp3 from your video clips so that you can enjoy them offline.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.
Suggested Courses

577 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