Filled Plugin which deletes folder

Discussion in 'Plugin Requests' started by iwitrag, Mar 3, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    iwitrag

    Hello,

    I'am requesting plugin, which removes folder from FTP (folder deleter)

    Commands:
    /fd <path>

    Permissions:
    fd.delete

    Usage:
    /fd plugins/folderToBeDeleted

    It will be possible to delete any folder from FTP - even from root (for example delete world's folder).

    Thanks
     
  2. Offline

    au2001

    @iwitrag That is definitly possible with Java, but why don't you just delete the file with an FTP client?
     
    iwitrag likes this.
  3. Offline

    iwitrag

    It's long story - I just need it for my minigame made by skript.

    I just really need it. Trust me.
     
  4. Offline

    au2001

    iwitrag likes this.
  5. Offline

    iwitrag

    @au2001 - Wow you made it so fast! Thanks a lot!

    I have tried your plugin and it seems that it can delete only empty folder. I have made folder "test" with no file inside and it worked like a charm! Then I have added 1 file into it and even it says that file or folder has been deleted, it wasn't.
     
  6. Offline

    au2001

    @iwitrag Humm, I didn't know that I had to delete all the files in a folder to delete it...
    Just fixed it (with recursive methods, I love them), you can click the link above to update it ^.^
     
    iwitrag likes this.
  7. Offline

    Avygeil

    @au2001 You should probably restrict it to the plugins/ folder for security.
     
  8. Offline

    iwitrag

    NO WAY! I need to delete from root, not from plugins!


    @au2001 - Thank you, I will try it out :)

    EDIT: okay, I have tried updated version of plugin - now it correctly delete all files (even from subfolders) - but it won't delete subfolders itself and main folder. So all sub-folders and main folder are still there, but they are all empty.
     
    Last edited: Mar 5, 2015
  9. Offline

    au2001

    @Avygeil Only players with the permission can use this, it is definitely a security issue, but it is @iwitrag's responsibility to protect his files (and commands), to prevent removing important files, he can just put permission restrictions on craftbukkit.jar and files like that, then the plugin will throw an error saying they are protected.
     
    iwitrag likes this.
  10. Offline

    Avygeil

    @iwitrag That is still a huge security issue. I didn't see you had to remove from root though. ;)

    EDIT: @au2001 It was just a suggestion considering you hadn't mentionned security. You're right saying that's his responsibility, but you can't expect everyone to manage file permissions correctly. Even then many things are still possible, though that's OP's choice to run it the way he wants. :)
     
    Last edited: Mar 5, 2015
  11. Offline

    iwitrag

    @au2001 @Avygeil - Don't worry guys, hosting, which my server is hosted on, creates backups of all server data every 2 hours and they are saved localy and even on remote storage servers... and those backups are stored for 1 year, which is awesome for me.

    And this permission is only given to server admins, these are ppl who are highly trusted and they have access to FTP itself .

    Please don't underestimate me.. I'm running one of the biggest MC servers in Czech Republic and Slovakia and I really know what I'm doing. Thank you.

    EDIT: @au2001 okay, I have tried updated version of plugin - now it correctly delete all files (even from subfolders) - but it won't delete subfolders itself and main folder. So all sub-folders and main folder are still there, but they are all empty.

    EDIT2: @Avygeil well you haven't read 1st post clearly... I have written it there (delete from root)
     
    Last edited: Mar 5, 2015
    Avygeil likes this.
  12. Offline

    Avygeil

    @iwitrag That's cool, I never said you were not able to manage your server. :) Nobody mentionned security, permissions or backups when I wrote my first post. It's easy to type something like /fd / by mistake. But @au2001 and you made it clear that it was to be used from trusted source anyway.

    I did read it, I said I hadn't seen it the first time I read your post which is why I suggested to jail to /plugins. Now I'll stop bothering since the security issue was sorted out. ;)
     
    iwitrag likes this.
  13. Offline

    au2001

    @iwitrag Woops, I forgot to delete the folders themselves, I'm such a noob :x
    And I hadn't really tested, I just tried on files, that's why...
    I re-uploaded the new version, tested on folders with subfolders (maps), and it works :D
    Note: It's still the same link :)
     
    iwitrag likes this.
  14. Offline

    iwitrag

    @Avygeil - okay, thanks , iam happy that it's clear now :)


    @au2001 - thank you so much for your work, now it seems to be working as I needed! Marking as solved, thanks to you :)
     
Thread Status:
Not open for further replies.

Share This Page