Image files remain in file system after Image Attachment deletion #16103
-
I'm running Netbox 3.7.4 and didn't find notes about this in https://docs.netbox.dev/ or any Release Notes of Releases after 3.7.4: When attaching an Image to a device, all works well and the file is created in /media/image-attachments/. The user as which Netbox runs in my environment (netbox) owns the "/media/image-attachments/" directory. Permissions for it are set to 755. Did I do something wrong or is it intended that image files stay in the file system when the related Image Attachments are removed in the Netbox UI? Thanks all for any hints! |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
It works fine for me in Netbox 3.7.8
Note that I'm using the default storage location, whereas you say you're using Try checking |
Beta Was this translation helpful? Give feedback.
-
FWIW I can confirm that image attachment files should be deleted from disk automatically when the object is deleted from the database. |
Beta Was this translation helpful? Give feedback.
-
Thanks both! I'm glad must be an issue with my setup then, I will check it again. @candlerb Thanks for mentioning the "journalctl" command, I will repeat the steps and check it out. The path to the image-attachments in my environment is "/opt/netbox/netbox/media/image-attachments/" as well, apologies for that I was unclear about this! |
Beta Was this translation helpful? Give feedback.
-
I tried again and it worked multiple times without any further changes whatsoever. Unsure what caused this phenomenon the last time, maybe something else I don't know about was still accessing the file. Anyway, thanks both for your help! |
Beta Was this translation helpful? Give feedback.
FWIW I can confirm that image attachment files should be deleted from disk automatically when the object is deleted from the database.