Bug reports Found a bug? Post it here please.
Version 4.x > Bug reports > deleting document from Disk View modes: 
User avatar
Member
Member
ASI-fujibikes - 11/15/2009 1:33:16 AM
   
deleting document from Disk
Hi,
I recently moved to a new server and performed some performance steps like Configure file caching where I selected yes in "store files in disk" and "redirect to disk". I got this error initailly of failing to access when I tried to upload the image files, then did some research and found need to add Network Service to allow file access.(referred this link http://devnet.kentico.com/Forums/f20/t6393/Insert-new-file-failed---AttachmentManager-Save---.aspx)

But again when I tried to delete tha whole folder which includes different documents and images and pdf, it deletes all documents but it does not delete the images and pdf from disk and gives the following error
Failed to delete the document: Access to the path 'C:\ASI\Fuji_Germany2009\files\c5\c581c597-1277-4455-80b8-dcc24b25f12d.jpg' is denied.

I am not sure is there any issue with file deletion, or do we have to do the deletion manually?

Sid

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 11/24/2009 1:08:48 PM
   
RE:deleting document from Disk
Hi,

could you please check if the permissions for Network service which you had set were inherited for all subfolders as well?

Best Regards,
Juraj Ondrus

User avatar
Member
Member
ASI-fujibikes - 1/22/2010 10:38:43 AM
   
RE:deleting document from Disk
I did check the permissions... I gave fullcontrol to Network services for all files and subfolders but it still gives the deleting access denied..
I was thinking that is it because of files being readonly???

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/25/2010 3:16:41 AM
   
RE:deleting document from Disk
Hi,

How are you deleting it? If you are deleting the files directly on file system, it is possible that they are locked by the application process.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
ASI-fujibikes - 1/25/2010 2:57:45 PM
   
RE:deleting document from Disk
Basically when I try to delete a document containing an image or pdf file which is stored in the disk(for improved performance) It gives me the error that access is denied to delete that particular image or PDF.
Then as an alternative what I do is follow the access denied path and delete it directly from the disk...

what did you mean by "locked by the application process"...

Thanks,

Sid

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 2/1/2010 2:07:22 AM
   
RE:deleting document from Disk
Hi,

It is very strange. What I meant is, for example, if there is anti virus program which is checking the file, usually the file is locked only for the anti virus, so no other applications can access the file. Are you able to delete the file on file system directly?

Best Regards,
Juraj Ondrus

User avatar
Member
Member
ASI-fujibikes - 2/19/2010 9:57:38 AM
   
RE:deleting document from Disk
Yes Juraj,

I am able to delete the files directly.

Thanks,
Sid

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 3/2/2010 6:20:02 AM
   
RE:deleting document from Disk
Hi,

It is very strange. I have never encountered such an issue before. Are there any events logged in the Windows event viewer regarding the file locking, or exceptions when trying to delete the file(s)?

Best Regards,
Juraj Ondrus