FileManager: Reset Owner: needed POST (SKINS)

Version 1.58.2


The "Reset Owner" and "Recursively" buttons in the Enhanced FileManager were using GET requests, but needed POST. Using GET produced: "The requested command requires POST but GET was used" Solution is to have a form, submitted via javascript when given path is clicked. ============== SKINS enhanced/user/filemanager/main.html added: <form id='reset_owner_form' action='/CMD_FILE_MANAGER' method='POST'> <input id='reset_path' type='hidden' name='path' value=''> <input type='hidden' name='action' value='resetowner'> <input id='reset_method' type='hidden' name='method' value=''> </form> <script type="text/javascript"> function reset_owner(f, recursive) { if (recursive == "1") { document.getElementById("reset_method").value = "recursive"; } document.getElementById("reset_path").value = f; document.getElementById("reset_owner_form").submit(); } </script> As the hrefs in the table will now call: reset_owner('/full/path/file.txt', '1'); where '1' for recursive and '0' for just that file.

Interested to try DirectAdmin? Get a 30-day Free Trial!