Unknown parent

friendica - Link to source

Adam

Hi @Michael Vogel - I don't see any current enhancement request for this, but do you believe it would take much to add in a console function to check for (and potentially delete) orphaned files on the system? I believe the only 'truth' about whether a file should exist in storage or not would live in Friendica's DB, so it could be good to have Friendica take care of any storage messes that might have accumulated?

I don't believe we currently have this sort of ability to check easily...

Unknown parent

friendica - Link to source

Adam

I wouldn't presume all files are images - I mean that if one is doing filesystem storage to a path /friendica/storage - then doesn't Friendica have a chunk of information in it's DB about every single file that should be in there?

If I then manually added 'rubbishfile.txt' to /friendica/storage on my own (or if Friendica wasn't cleaning things up appropriately for some reason), then shouldn't we be able to ascertain that file shouldn't exist in that storage location based on what Friendica knows about it's storage location?

Unknown parent

friendica - Link to source

Adam

Err... shouldn't that be a volatile location and only used for Friendica's storage? I can't think of a use case where someone would take /usr/bin and set that up for Friendica storage.

Friendica storage should be a location for friendica to store things and nothing outside of friendica should use it, no?

Unknown parent

friendica - Link to source

Adam

oh, I must've missed the notification for this comment, sorry Michael.

Yes, I personally believe any person running a system that needs a storage path should be dedicating that path to that one thing - that would be putting way too much trust in a piece of software to have it share some path that you've put something else in. (Notice how I said 'should'... heh, I know...)

It would be easy enough to change the wording in documentation and in the admin UI to clarify that this storage location must be dedicated to friendica as it will maintain every file in it, including removing anything it does recognize as it's own.

⇧