Register Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools
  #1  
Old 23 Aug 2017, 21:57
ed762 ed762 is offline
 
Join Date: Sep 2014
Attachments in File Upload Manager

Does anyone know which one of the scheduled task is responsible for cleaning attachments that are not used in the file upload manager? It looks whatever cron it is supposed to be does not work, so none of the attachment gets cleaned up.
Reply With Quote
  #2  
Old 23 Aug 2017, 22:03
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
I believe /includes/cron/cleanup2.php around line 64 to 72.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #3  
Old 24 Aug 2017, 21:06
ed762 ed762 is offline
 
Join Date: Sep 2014
Find the lines. The cron ( Vb 4.2.3 ) is not working and images are still sitting in the file management even after 1 hour.

Does anyone know the reason why this is not working? Has anyone manually deleted the images that are no longer associated with any posts? How did you go about cleaning it up?
Reply With Quote
  #4  
Old 24 Aug 2017, 21:21
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
Is the refcount column value in the Filedata table 0 of said attachment(s)?
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #5  
Old 24 Aug 2017, 23:02
ed762 ed762 is offline
 
Join Date: Sep 2014
None of the attachments have "0" in the refcount at all . Is that why the cron fail?
Reply With Quote
  #6  
Old 24 Aug 2017, 23:16
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
Yes. refcount is the reference count (or the number of references to that attachment). It has a strict check of 0 against it, which is why it doesn't delete the attachments.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #7  
Old 25 Aug 2017, 00:28
Stingray27 Stingray27 is offline
 
Join Date: Jan 2006
Originally Posted by ed762 View Post
None of the attachments have "0" in the refcount at all . Is that why the cron fail?
Its not failing then, its doing its job.
Attachments with a ref count > 0 should never be deleted.
Reply With Quote
  #8  
Old 25 Aug 2017, 12:22
ed762 ed762 is offline
 
Join Date: Sep 2014
Originally Posted by Dave View Post
Yes. refcount is the reference count (or the number of references to that attachment). It has a strict check of 0 against it, which is why it doesn't delete the attachments.
Is this a bug within VB? because obviously there is a large number of images that are not in use by any threads.

Anyway to manually fix it?
Reply With Quote
  #9  
Old 25 Aug 2017, 14:52
Dave Dave is online now
 
Join Date: Jun 2010
Real name: Dave
I'm not aware of any bugs regarding attachments in the latest version of vBulletin.
__________________
https://technidev.com - security, development, exploits, vBulletin
dave[at]technidev[dot]com

Contact me for custom vBulletin 3/4 work & server/website management.
Reply With Quote
  #10  
Old 25 Aug 2017, 14:52
Kane@airrifle's Avatar
Kane@airrifle Kane@airrifle is offline
 
Join Date: Jun 2011
Real name: Kane
Originally Posted by ed762 View Post
Find the lines. The cron ( Vb 4.2.3 ) is not working and images are still sitting in the file management even after 1 hour.

Does anyone know the reason why this is not working? Has anyone manually deleted the images that are no longer associated with any posts? How did you go about cleaning it up?
Yes but it is obviously fraught with danger. You need to triple check everything and backup first.

I used the queries from this post: https://www.vbulletin.com/forum/foru...00#post3948600

There was a VBIV open for the failing cron cleanup, not sure if it was fixed in 4.2.3
Reply With Quote
Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Miscellaneous Hacks Asset Manager / Image Upload Fix to upload multiple files like the Flash uploader BirdOPrey5 vBulletin 4.x Add-ons 38 19 Jan 2018 14:26
Admin CP File Manager (FTP) - Download, Upload, Edit, Rename, Delete PHP Files/Images Erwin vBulletin 3.0 Full Releases 125 03 Feb 2007 17:49



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 03:37.

Layout Options | Width: Wide Color: