File manager for Webmin

344 posts / 0 new
Last post
#1 Mon, 04/13/2015 - 03:59
RealGecko

File manager for Webmin

Webmin is superb web panel, however for me it always lacked one feature: file manager. Webmin has built in file manager that is really good in design and user friendly, however it is written in Java and so is slow and requires additional software on the user side to run. Googling around did not give any results and I decided to write my own file manager with black jack and ... oh whatever :) Meet the Filemin - lightweight file manager for webmin, written completely in perl. For now it is tested and known to work well with Webmin 1.740 under Ubuntu 14.04 and Debian 7, Webmin 1.710 under Arch. Bug reports and criticism are welcomed :) github repo: https://github.com/Real-Gecko/filemin

WARNING! ACHTUNG! ALARM ALARM!!! Webmin 1.770 is out! Filemin is now in da core. No more need to manually install.

NOTE!!! Fresh installation makes all users able to access Filemin WORK AS ROOT AND SEE WHOLE FILESYSTEM. PERFORM SECURITY TIGHTENING AFTER UPGRADE AND FRESH INSTALLATION.

Thu, 05/07/2015 - 16:32
andreychek

Howdy,

I just wanted to mention that I tried out your filemanager -- nice work! I'll send you an email about that shortly, as we'd like to make it easier for you to do additional development.

-Eric

Fri, 05/08/2015 - 21:59
Joe
Joe's picture

This is fantastic! I've already been playing with it and filing tickets about it, but wanted to chime in on this thread, too, because everybody ought to try it.

I've always hated the Java File Manager (or, rather, I hate Java applets, in general...the File Manager is really impressive work, but Java in the browser is a dead end), but this is so nice. Actually, I ignored File Manager so thoroughly (last time I spent any time with it was when I re-did the UI with new icons and stuff about ten years ago) I didn't even really realize how many people used it until it started being hard to run it because Chrome disables Java, by default.

--

Check out the forum guidelines!

Thu, 05/14/2015 - 23:10 (Reply to #3)
RealGecko

Yeah, I think Java in browser is a dead end :) That`s why I created filemin.

Wed, 06/10/2015 - 04:42 (Reply to #4)
JohnWolgamot

Did Google remove java functionality because it's an insecure dying language? Java has many times seemed clunky in general.

I like this new slick file manager and, I also like the old clunky but very useful Java file manager. The old file manager has a great Grep function to grep for contents of files etc. I have secretly wished the grep window would stay open after you click a found file so you could inspect other found files without needing to redo the search.

I also found it is good for moving large amounts of files since it seems to operate like a shell move command. Just cut a large folder and paste it in the new location and it is an instant operation.

Copy and Paste of large folders is very fast too.

you can use the copy paste function within the same folder and it will ask you to give a new name so before you begin work on a folder of .css files for instance you can make a quick dupe of the folder. I've used it for years and really like it, even though it is kind of clunky in it's operation.

Your new Perl based file manager is very slick and I like it a lot and would like it even better if it had similar grep functions and other functions of the Java file manager has.

I like winscp because it moves large folder very fast like the java file manager does but you have to have the tree in a position where you can drag a large folder to the new location. With the Java file manager you just cut then go to the new location and paste and presto, instant move.

Pros and cons as you can see.

Winscp works so well I find myself using it under Wine in Linux. Even scp under gFTP isn't the same. So for some stuff, I waffle between MidnightCommander, the Java File Manager and WinSCP.

Thanks for developing this new File Manager. I would love for this new Slick FileManager to be the winner in all areas. I've tried a lot of them and still go back to the clunky old Java file manager.

John Wolgamot

Mon, 08/29/2016 - 03:27 (Reply to #5)
unborn
unborn's picture
  • have look at codiad.. it could be used as an ide but also can manage files.. or perhaps there are some others...

Configuring/troubleshooting Debian servers is always great fun

Thu, 05/14/2015 - 08:50
andreychek

I made your post sticky so that it'll be easier for folks to see it.

-Eric

Thu, 05/14/2015 - 14:22
vl1969

sorry, but not really good with Linux yet and especially with webmin how do I install it from the webmin ui?

Thu, 05/14/2015 - 23:13 (Reply to #8)
RealGecko

Login to Webmin, then go to Webmin -> Webmin configuration -> Webmin modules -> Install from - FTP or HTTP URL and paste the following link: https://github.com/Real-Gecko/filemin/blob/master/install/filemin-0.9.wb...

Thu, 05/14/2015 - 23:28 (Reply to #9)
Joe
Joe's picture

For whatever reason, it choked when I did it that way, so I ended up downloading it and then uploading it using the "Browse.." button on the same form. Dunno why it failed, and was something I meant to track down.

--

Check out the forum guidelines!

Fri, 05/15/2015 - 00:18 (Reply to #10)
RealGecko

Hmm, it works nice for all my systems. However if you dealed with it - that's greate :)

Tue, 06/02/2015 - 03:34 (Reply to #11)
arp

Is it likely to work under FreeBSD? And if not what would be required to get it to work?

Tue, 06/02/2015 - 06:01 (Reply to #12)
RealGecko

I did not test Filemin under FreeBSD, but it is oriented on UNIX-like so I think it must work. I'll try to deploy FreeBSD box for testing purposes and will make sure it is. Wait few days for 0.9.2 release :)

Tue, 06/02/2015 - 18:34 (Reply to #13)
arp

Thanks, much appreciated.

If you need someone to test it on FreeBSD I'd be happy to help.

Thu, 05/14/2015 - 23:17
RealGecko

Thanks, people, for your support. I`ll continue on improving Filemin. Comments and wishes and of course bug reports are welcomed. For me the most improtant thing is bug fixes especially concerning security. It would be great if more people test the module and report :)

Thu, 05/14/2015 - 23:53
Joe
Joe's picture

Oh, by the way, you should put up a PayPal donate link or something, just in case anybody feels so excited by the project that they want to contribute somehow. ;-)

Also, Jamie and I were talking about the Java File Manager problem, and we will be deprecating the Java File Manager sometime soon-ish and removing it from Webmin. So, since we'll be needing a replacement, we were wondering if you'd consider re-licensing Filemin under the same BSD license as Webmin so that we could include it in Webmin (GPL is fine for modules distributed separately, which we do with the Virtualmin modules, and GPL is generally my preference for my own development), but for being included in Webmin core it probably needs to be a BSD compatible license, since there are so many embedded users of Webmin who rely on being able to distribute it without any significant encumbrance.

We'd need to spend some time going over the code for security concerns, and would need to add in some of the ACL capabilities that File Manager currently has (i.e. pretty fine-grained file access controls, quite a few additional file attribute capabilities, etc.), but I think Filemin already does what 95% of people use File Manager for, and that's awesome! Since Webmin has about a million installations (seriously!), we'd have to proceed with caution, but Filemin is really the best thing going for addressing this problem!

--

Check out the forum guidelines!

Fri, 05/15/2015 - 00:16 (Reply to #16)
RealGecko

Sure, changing license is not a problem. I'll put the same one that's used by Webmin. And I think it is time for me to review Java File Manager features and think about implementing to Filemin those not included yet, so that people would not miss something they used to. Security code review would be great. I'm trying to do my best to keep things secure, however as it is said "A problem shared is a problem halved", so any help would be great :) That`s one of the reasons I've still not implemented symlinks handling - to prevent users poking around filesystem.

Fri, 05/15/2015 - 06:21
vl1969

you guys are the best :-) thank you.

I do however have to rebuild my setup again. (it's ok I am still playing with it at the moment, all is new and uncertain yet.)

but I definitely loading this FM up on the new build.

Fri, 05/15/2015 - 17:54
vl1969

when I run the filemin it goes to my home folder, is it possible to navigate to the root ie. main filesystem folder?

can you add this feature ?

good idea ?

as my server is headless, I would like to do some things within webmin. and I might need to navigate to folder other than my home folder. I mean my user is full admin so shouldn't I have access to whole system?

Sat, 05/16/2015 - 08:44 (Reply to #19)
RealGecko

Latest version lets root to go anywhere in the filesystem, but blocks all other users in their home. I'm planning to implement ACL to make this thing more flexible.

Sat, 05/16/2015 - 11:46 (Reply to #20)
vl1969

I am login in as a user with admin rights, the one was created at install. ubuntu does not have root user enabled by default. I will try enableing it thanks.

Mon, 05/18/2015 - 00:23 (Reply to #21)
RealGecko

Well root under Ubuntu unlocked easily sudo su then passwd and voila, you can login as root :)

Mon, 05/18/2015 - 06:35 (Reply to #22)
vl1969

well it's true that the process is easy. although I have seen instructions for Ubuntu that involve a few more steps to be done than that.

also it took me a few tries to realize what was happening.

I still think that this file manager is tons better than Java based that is currently in use. I can't wait until Webmin guys replace the old fm with this one. it's much faster and works much better.

however I do have much more pressing matters at the moment to worry about it. my whole install is not working so, I am out of here for a while to find the solution for it.

still have to say GOOD JOB and THANKS for all your work.

Wed, 05/27/2015 - 14:20 (Reply to #23)
Joe
Joe's picture

I think the better long-term goal is to support the same idea as Webmin for this. When the user has sudo ALL privileges in the /etc/sudoers file, they can access Webmin as a root user (but will have a non-root user name). I'm not sure how Webmin distinguishes this, but I'll ask Jamie if there's a simple API call you can make or if it's a global config variable that you could check to see if the user is one of those "root" users. That way you could automatically unlock full filesystem access for those users without making them set a root password and login as root.

--

Check out the forum guidelines!

Thu, 05/28/2015 - 06:02 (Reply to #24)
RealGecko

Yeah, that would be great :)

Thu, 05/28/2015 - 17:17 (Reply to #25)
Joe
Joe's picture

So, Jamie explained that the way that feature works is that when logging in, if the user has sudo ALL capabilities, the username is set to "root".

I think you can just check the $user variable for that. I'm not ure if that needs any additional steps to make that available. Maybe an:

our $user;

At the beginning of the module to avoid any strict/warnings messages from perl for undeclared variables.

--

Check out the forum guidelines!

Fri, 05/29/2015 - 06:17 (Reply to #26)
RealGecko

This does not work, at least at fresh Debian 8. Access validation is done by user name 'root' now. I've created a user, added him to /etc/sudoers and nothing. He did not become admin :)))

Mon, 08/03/2015 - 09:31 (Reply to #27)
spye

The idea that user must be root to have full access to the system seems okay in theory, but fails on a PCI-compliant server. PCI compliance demands that a user log in and access all systems using personal usernames, rather than as "root" or "administrator", and then use sudo to elevate as needed. All transactions must be traced back to the individual user. However, as a server administrator, I need to be able to edit files anywhere on the system, and having sudo privilege doesn't release that in filemin.

Mon, 08/03/2015 - 14:20 (Reply to #28)
RealGecko

miniserv.pl - the main webmin process accepting and processing user request launched from 'root'. So any *.cgi executed by remote user works with 'root' privileges. Filemin switches to UNIX user as early as possible by using standard Perl functionality, that does not inlcude any sudoing.

Sat, 05/23/2015 - 02:30
jvieille

Very good, it works seamlessly with Ubuntu 12.04.5 and 10.04.2, Debian Linux 7.4

  • The most missing feature for me is ownership and permission management similar to File manager.
  • The "rename" feature should default the current name (as permissions ans ownership as implemented at the moment).
  • The double windows of File manager is nicer too

Thanks a lot

Mon, 05/25/2015 - 03:32 (Reply to #30)
RealGecko

I'll revise Java FM's features and will try to implement usability as close as possible. Rename feature already defaults to current file/folder name. And with change permissions feature it is not obvious what user/group name must be default. Imagine if we select multiple files/folders with different owners, which one must be default? Any suggestions are welcomed. Double panel FM in web browser will take a lot of space and requires complete interface redesign. I try to keep Filemin's interface as compact as possible while keeping usability at max. If you have any ideas of better interface design, then suggestions are welcomed.

Wed, 05/27/2015 - 14:02 (Reply to #31)
Joe
Joe's picture

I don't think the double-paned design is strictly necessary (then again, I don't use the old file manager, at all, so I don't have old habits to break), though it can be nice to have a way to easily navigate the filesystem folders. Like on Gnome, where there's a list of filesystems and user folders on the left in a small pane, and then breadcrumbs up top. Filemin already has breadcrumbs, so that's covered. I dunno how one might cover the folders thing easily, though, in a way that doesn't take up a lot of space.

It's possible for modules to add items to the left hand menu, but the usual use case for that doesn't fit this situation. Maybe we should look at Dropbox, Google Drive, Amazon Drive, and whatever MIcrosoft's product in this space is called for design ideas. Surely one of them has solved the problem in a nice way that we could copy without going the old-fashion panes route of old File Manager.

But, I agree with you: Given that we already have a left pane for menus, it is clumsy to cram another left pane in there (it's clumsy in the current File Manager, too). Maybe a right hand pane would make sense, or a dropdown selector with all of the filesystems available to the user, if they have any other than their $HOME.

--

Check out the forum guidelines!

Wed, 05/27/2015 - 10:31 (Reply to #32)
vl1969

not sure what you mean about permission and ownership. there are 2 buttons on the right that do ownership and permission.

I can attest that it works on CentOS 7 setup superbly as well.

Mon, 05/25/2015 - 03:00
apochr

Hi there, very nice addition. I stumbled into the Java issues just like everybody and tried this one. I would like to suggest a monospace font for the edit_file.cgi screen. I have been using Java File Manager a lot for quick edits and it helps a lot to have such a font (Courier, Lucida Console or other) so that you can see the proper character alignments. A donate button somewhere would be attractive for me too ;-).

Mon, 05/25/2015 - 03:36 (Reply to #34)
RealGecko

Yeah, quick edits are pretty good, for example quick CSS bugfixes, that's why I've created this feature :) If you selecte Authentic theme you'll have monospace font in edit window and even lot more: line numbering, slight syntax highlighting, etc. And with all other themes I'll add css fix shortly :)

Wed, 05/27/2015 - 09:33
jonnybradley

An answer at last to all our prayers, thank you so much!

Only just installed it but it looks very promising so far - same comments/wishes as others mostly (rename default to current, same for chmod and chown if possible etc) but a great start - really impressive for a 0.9 version!

And a donate button would get used too! :)

Many thanks again,

jonny B

Wed, 05/27/2015 - 11:40 (Reply to #36)
RealGecko

Rename already defaults to current in version 0.9, check and report if it's not so, I'll try to reproduce if something is wrong. I'll look into making chmod and chown look same like in Java FM. Currently chmod lacks some features like stycky bits etc. I'll fix that shortly. And I have general issue with "Donate" button: I'm from Kazakhstan and currently PayPal does not provide "Donate" feature for my country, all those bureaucratic things, you know. So maybe there's another way to provide donations if so many people want to contribute :D Maybe I shall try to register another PayPal account through proxy somewhere in America? :D

Wed, 05/27/2015 - 12:31 (Reply to #37)
jonnybradley

Thanks for speedy reply RealGecko, but no, for me the prompt appears empty.

I installed the 0.9 tag as suggested on this page somewhere - and the js function renameSelected in there does prompt("New name ", "") so an empty string for the contents. Actually it's the same in master too.

I think what you need is prompt("New name ", file) maybe?

Thanks again though, not really complaining! :)

jonny

Thu, 05/28/2015 - 06:16 (Reply to #38)
RealGecko

Ah yes, man. I presume you're using one of those good old themes like MSC.Linux Theme. And I forgot to add this "default" feature to JS responsible for 'em. It currently works only in Authentic Theme. My mistake, will fix that :)

Thu, 05/28/2015 - 06:53 (Reply to #39)
jonnybradley

Authentic Theme? Hmm, i don't see that - it seems i'm using "Virtualmin Framed Theme" which looks really ancient, but works. A few years ago during a virtualmin upgrade somehow the theme got hosed and borked the whole thing, so i'm wary about messing with it (don't care if it's ugly, just need it to work!)

The ones i seem to have (on webmin->config->theme) are Old Webmin theme, Caldera Theme, Gray Framed Theme, Gray Framed Theme (again?), MSC.Linux Theme, Virtualmin Framed Theme and Virtualmin Mobile Theme. No sign of Authentic :(

Do i have to install it? (would prefer to stick to Webmin provided stuff generally, Filemin is an exception! :)

Thu, 05/28/2015 - 07:59 (Reply to #40)
RealGecko

Then I presume that your version of Webmin is earilier then 1.740. Authentic Theme developer did such a good work that Webmin team included his theme in Webmin bundle and they're planning to add Filemin there too :))))

It is ok to stay with Framed Theme if you prefer. I'm currently integrating jQuery and jQueryUI so Filemin will look nice with old themes too. And there is some JS hell produced by Framed Theme and Virtualmin Framed Theme I need to fix. Just wait a few days for new Filemin version release and you'll get some cool new stuff :)

Fri, 05/29/2015 - 01:39 (Reply to #41)
jvieille

Authentic theme looks nice, but is awfully slow - 10 seconds to get any page to display...

Fri, 05/29/2015 - 02:40 (Reply to #42)
fakemoth
fakemoth's picture

This is not true, at least for the vast majority of us; you might have really old hardware, network issues, a slow server, problems with the local drivers and so on. Authentic is as fast as it gets.

Don't take the name of root in vain...

Fri, 05/29/2015 - 03:05 (Reply to #43)
jvieille

I tried on another server, it is fine actually - yet slower, but OK. The one I tried was an older server, though powerful. Strangely, it is now as fast as the new one...

Tue, 06/02/2015 - 17:30 (Reply to #44)
Joe
Joe's picture

I wouldn't say "as fast as it gets", but it's acceptably fast. ;-)

We do plan to do some performance work on Authentic in the coming weeks, but even now it should be usably fast even on modest server hardware. The client-side might be a little sluggish if you've got a very old phone or tablet or something.

--

Check out the forum guidelines!

Wed, 06/03/2015 - 10:13 (Reply to #45)
fakemoth
fakemoth's picture

:D so it can get even faster? Hooray, hail the almighty TUX!

Yeah - told Ilia a few times, works pretty poor even on good hardware (Nexus 6 phone and Nexus 7 tablet) in Firefox mobile and Android 5.x. But he just can't reproduce it. No problems elsewhere, not on the desktops/notebooks.

Don't take the name of root in vain...

Wed, 05/27/2015 - 14:17 (Reply to #46)
Joe
Joe's picture

Surely there's an international alternative to PayPal we could use?

Do you use Bitcoin? I would also be happy to donate via Bitcoin.

If getting Bitcoin converted to your local currency is difficult, I'd also be able to wire money if that would work better (not regularly, as it is quite expensive to send international wires from the US, but could do it every few months).

I don't want to distract you with monetary concerns, of course; I want to support your work in whatever way is most useful to you. But, I know it's nice to be able to pay the bills and put food on the table, particularly doing something you were working on anyway!

--

Check out the forum guidelines!

Wed, 05/27/2015 - 10:22
fakemoth
fakemoth's picture

WoW, lost hope for a new FM in Webmin, kinda missed all this buzz. Good to hear, I will try it soon; Webmin is really reborn again with Authentic theme and now with a file manager. Thank you very much!

Just one question:

Are the users (the webmin/master virtualmin users, if I activate the module) jailed in their homes, can we let them safely access the file manager? I am interested if the ACL is working, no one wants users to be able to edit (nor see, because everyone has the database username and the password for the websites in configuration files, right?) other user files, or even root.

RealGecko can you share a few words about this?

Later edit: Testing it now. Man I had an awful day but you put a smile back. Are you taking feature requests? If yes, here are a few for you to consider, if not, sorry:

-can you offer some tree view in a left smaller table somehow. For easy navigation and the resemblance to a standard file manager?

-also maybe the rows could use a smaller height, it would be more ergonomic when you got a lot of files and dirs;

-the default view can be switched to a "folders first" view?

Thank you once again! I am in the end now able to use webmin comfortably, not having firefox (for the Java applet) and chrome (because of its speed) both opened on the same server...

Don't take the name of root in vain...

Wed, 05/27/2015 - 12:09 (Reply to #48)
RealGecko

Yes, all users except "root" are locked in their $HOMEs. That's hardcoded. And that was the primary option while I was designing Filemin, there is a whole bunch of code that does not let ordinary user to go out of his/her $HOME :D And that's the primary cause why there's still no symlinks support, so that malicious script kiddies would not even have a chance to go somewhere they're not supposed to. And that's why I count security testing is PRIMARY goal for now, cause I may miss something during development. So I suggest not to give Filemin access to ordinary users for now, unless you're pretty sure they won't mess with the system :)

I'll look to implementing tree view later on. For now I've created two milestones here https://github.com/Real-Gecko/filemin/milestones to organize all features I think important and other people request, most important are labeled for 1.0 release.

Yes, row height grew a little after I added Authentic support :)))) I'll fix that too.

And YES! The question that bothers me for 1.5 year: FOLDERS GO FIRST???? I was afraid performance issues during sorting, that's why it is as it is now (dam, what am I writing :D) But I'll think about adding this feature too as all other file managers do, as soon I'll develop good sorting algorith that would not hit performance.

PS: I've currently encountered some issues with Archive::Zip library, so I'm redesigning "extract" functionality completely to get rid of dependencies and make things work through good old "system" calls. ACL functionality will be the next waypoint in my development. After that I'll release new version: 0.9.1 I think it will be.... yeah 0.9.1 :D

Wed, 05/27/2015 - 13:34 (Reply to #49)
fakemoth
fakemoth's picture

Thanks for the detailed answer, and also for considering our requests. Good to have a file manager that is centered on security as in user isolation, else it will be limited only to us, the guys with the root account, thus defeating its purpose.

Btw I for myself will take it either way :)

I am more of a "copy that thing" guy. Symlinks for me... Neah... Not on my servers.

Just keep us posted about the development.

Don't take the name of root in vain...

Wed, 05/27/2015 - 14:34 (Reply to #50)
Joe
Joe's picture

On the folders first question, there's some examples here: http://stackoverflow.com/questions/16793043/perl-readdir-in-order

I haven't tried them, but the selected answer looks solid and doesn't require any non-standard dependencies. Performance isn't going to be a big problem except in pathological cases (maybe my Maildir/cur folder would be a problem with its 85,000 files, but that's a problem on the command line, too!), as these are very tiny operations and would take very little memory or CPU to process.

--

Check out the forum guidelines!

Pages

Topic locked