Jump to content

File delete on NAS fails silently (#1819)


lintujuh

Recommended Posts

Hi!

 

I noticed, that when I delete my items, located in NAS, are deleted from the catalog, but not deleted from the disk even when I have ticked "Move into recycle bin".

 

When I looked into the logs, in errors.txt, there is an entry for each item I have tried to delete

2018-09-10 19:47:55,451 [91] ERROR PicaJet.Daminion.Service.Utils.DeleteMediaItemsCommand [(null)] - (67173)
System.Exception: error: 124 while moving file \\192.168.2.3\Multimedia\Pictures\2018\Kurssi\Kesatehtava-page001 - Copy.jpg to recycle bin
  at PicaJet.Daminion.Common.FileWork.FileImp.Delete(String path, Boolean deleteToRecycleBin)
  at PicaJet.Daminion.MediaStorage.BaseMediaStorage.DeleteFile(String filePath, Boolean deleteToRecycleBin)
  at PicaJet.Daminion.Service.Utils.DeleteMediaItemsCommand.DeleteFileFromDisk(String fullPath) in C:\DaminionAuto\code\Service.Utils.Uni\Command\DeleteMediaItemsCommand.cs:line 104

And in log.txt the same event

2018-09-10 19:47:55,437 [91] DEBUG PicaJet.Daminion.Service.Utils.DeleteMediaItemsCommand [(null)] - Start: (67173)
2018-09-10 19:47:55,438 [91] DEBUG SQL [(null)] - select ID_User, ID_CheckOutVersion from MediaItems where Id = @Id (@Id=32845)
2018-09-10 19:47:55,439 [91] DEBUG SQL [(null)] - update MediaItems set Deleted = @Deleted where ID = @Id (@Id=32845, @Deleted=True)
2018-09-10 19:47:55,442 [91] DEBUG SQL [(null)] - select ID, MediaItemId, RevisionId, RelativeDataPath from ThumbnailStack where MediaItemId = @Id and RevisionId is null (@Id=32845)
2018-09-10 19:47:55,446 [91] DEBUG SQL [(null)] - delete from ThumbnailStack where MediaItemId = @MediaItemId (@MediaItemId=32845)
2018-09-10 19:47:55,447 [91] DEBUG SQL [(null)] - select ID, Name, MediaFormatUi, Deleted, HashCode, ID_ImportSession, ID_TopMediaItemStack, CountOfStackItems, LinkedInCount, LinkedOutCount from MediaItems where Id = @Id (@Id=32845)
2018-09-10 19:47:55,448 [91] DEBUG SQL [(null)] - select ID, FileName, PCName, HFN, RelativePath, FileSize, CreatedTime, ModifiedTime, AddedDate, Type, OfflineFilePath, Embedded, PropertiesChangeDate, Offline, ID_Folder, IsPrimary from Files where isPrimary and id_mediaitem = @mediaItemId; (@mediaItemId=32845)
2018-09-10 19:47:55,451 [91] ERROR PicaJet.Daminion.Service.Utils.DeleteMediaItemsCommand [(null)] - (67173)
System.Exception: error: 124 while moving file \\192.168.2.3\Multimedia\Pictures\2018\Kurssi\Kesatehtava-page001 - Copy.jpg to recycle bin
  at PicaJet.Daminion.Common.FileWork.FileImp.Delete(String path, Boolean deleteToRecycleBin)
  at PicaJet.Daminion.MediaStorage.BaseMediaStorage.DeleteFile(String filePath, Boolean deleteToRecycleBin)
  at PicaJet.Daminion.Service.Utils.DeleteMediaItemsCommand.DeleteFileFromDisk(String fullPath) in C:\DaminionAuto\code\Service.Utils.Uni\Command\DeleteMediaItemsCommand.cs:line 104

In the client, everything goes fine; there is no error message and the item is removed from the catalog.

 

In NAS daminion user has RW access to the folder and in Windows daminion is local admin user.

 

-Juha

Link to comment
Share on other sites

Hi Juha

 

I just tried this on my Synology NAS and the deletion worked, but the item did not get moved the to the NAS recycle bin as should have been expected.

 

I use Synology Photo Station, configured to use the NAS accounts. This means that permissions have to be assigned in Photo Station The Daminion user has Administrator status. That's Administrator as in Photo Station's status. I am unable to see what underlying file system permissions are associated with Administrator but they are universal to all subfolders

Link to comment
Share on other sites

Hi!

 

I think I know what was the problem. I updated the firmware of my NAS and it had to be rebooted. I didn't stop Daminion server during the reboot and I believe that caused the error. When I stopped and restarted Daminion server, the deleted items were properly moved to NAS recycle bin.

 

There should be a warning to the user if the delete operation fails and the items are not properly removed from the disk. I think I'm not the only one who has Daminion server up and running while I'm rebooting my NAS.

 

-Juha

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...