file browser in webui


Recommended Posts

5 minutes ago, je82 said:

I have many shares, i use krusader to move files from \\mnt\user\myshare1 to \\mnt\user\myshare2 , how exactly would the files disappear?

If you move from /mnt/disk1/share/filename to /mnt/user/share/filename (expecting the file to stay in the same share, but move to a different disk due to include / exclude rules), you will actually corrupt the file because at the end of the day, /mnt/disk1/share/filename and /mnt/user/share/filename is actually the same path to the source and the OS attempts to read the file while it's writing to the identical file.  Net result is that the file gets corrupted.  Its not a bug in the traditional sense, as by referencing disk1 and the same share via user  you are bypassing the system.  Hence why you should never mix disk references and share references (/mnt/diskX and /mnt/user) in the same command or operation.

Link to comment
4 hours ago, trurl said:

If you are referring to #1 in the text you quoted, it does not apply to your scenario since you are not mixing disks and user shares. When you might encounter the problem is if you were moving or copying from /mnt/disk1/share1 to /mnt/user/share1 or /mnt/user/share1 to /mnt/disk1/share1.

I agree totally. I think that, when creating a native File Explorer it should be pointed really really clear that mixing /mnt/user/ with /mnt/diskN will corrupt data. Thinking about the interface, I think it should be warned at the first use, or pointed very clearly. Not everybody knows or understand Linux and even what "mounting" is. To avoid beginners mistakes I would create "safe" shortcuts to the recommended or safe places to go to manipulate files or folders. I'm thinking about the /mnt/user/ address specifically, I think it should be the default address, and if the user moves out of there (to the higher /mnt/ address) then he or she should get a warning. It takes a while to understand that /user/ correspond to the "Shares" tab within the UnRAID admin page. So maybe the best is to call that shortcut "Shares" for consistency with the UnRAID naming convention.

 

I think having a File Explorer is a great addition to UnRAID. Sometimes deleting or moving files or folders is much faster locally than via LAN, and specially if there's any weird thing going on with permissions or so, having a way to access the file system from the admin UI is a great addition. I like Dolphin, but I miss:

- Shortcuts on the left side of the screen.

- A text file editor (to edit some settings on some plugins or dockers that require it).

Edited by almarma
Link to comment
5 minutes ago, almarma said:

I think it should be warned

Here is the original post I made about this in case you missed it:

 

https://forums.unraid.net/topic/61985-file-browser-in-webui/page/2/?tab=comments#comment-723474

 

What I am suggesting there for "surprise" #1 is not a warning, but instead that any operation that would cause the "User Share Copy Bug" not be allowed at all. The problem is at the Linux level of things, but at a higher level it isn't that hard to detect when a move or copy would cause this problem.

 

And for "surprise" #2, the suggested workaround is explained there in that post.

 

So, if a file explorer were implemented, it would need to do some things other than just passing it to Linux to carry out the move or copy.

  • Like 2
Link to comment
  • 2 weeks later...

This could be a cool add on to the web ui. While Krusader is useful, it does have its kinks. A file manage with the ability to open text docs, pics, video, etc would be cool. But even baring something that heavy, just the ability to move files or at the very least rename them would be great. Having to fire up Krusader just to rename files that I had to source elsewhere just so sonarr/radarr can then rename them again so plex can see them is a pain with how finicky krusader can be. 

  • Like 2
Link to comment
  • 1 month later...
  • 2 weeks later...
On 1/7/2020 at 8:25 AM, jebusfreek666 said:

This could be a cool add on to the web ui. While Krusader is useful, it does have its kinks. A file manage with the ability to open text docs, pics, video, etc would be cool. But even baring something that heavy, just the ability to move files or at the very least rename them would be great. Having to fire up Krusader just to rename files that I had to source elsewhere just so sonarr/radarr can then rename them again so plex can see them is a pain with how finicky krusader can be. 

you can edit files in krusader, just select the file and press F4

Link to comment
  • 2 weeks later...

+1 but it should be done right. There are a few use case to this issue:

 

1. The local transfer case (local <-> local), this is covered by Krusader/Cloud Commander since the likely user in this case is the "admin" so it doesn't have to be pretty. For me this is not a big deal, I am happy with the current offering.

 

2. Remote transfer case (local <-> internet), this is partly covered by File Browser which has user built-in except it doesn't use unraid's user share permission, you need to create your own data path for each user (and you can only set a single root path for each user so you can't have multiple share folders for each user). For me this is what is missing from Unraid that other NASes have, the ability to access via Web GUI with correct user share permissions. This is very useful when you want to download a file from outside your network since you don't need to install any software or set up a vpn, and will please those other users who like pretty interface.

 

The second issue has another side benefit, in order to do this Unraid will need to support multiple user to Web GUI with limited access!

Link to comment

I really don't understand the negativity against this feature. Why shouldn't the solution be pretty or even elegant? Just look at how awesome the current webui of unRaid looks in contrast to a few years. 

All the suggested solutions (MC, Dolphin, Krusader) are horrible and ancient to use if you ever used Qnap or Synology (even low cost WD offers this). 

Then there are people saying that unRaid is lightweight. Look at all the features that unRaid added over the years. That's not light anymore, either. But it's awesome that this OS offers so many features. 

 

I think the best solution for now is using XPEnology inside a VM (which is definitely anything but lightweight) and then using the webui or the apps for file management. Is anybody using is already for this exact purpose? Would love to hear your experience.

I personally don't even need file management inside the webui, apps for tablets and smartphone would be enough. 

Link to comment
  • 1 month later...

+1

I think very basic functions should be added to the "view" function of shares and disks of the web UI. For example:

845835099_2020-04-2300_58_41.png.e22ccde2757c7bef75a38d6ef22a5c16.png

 

  1. Properties = Show amount of Files and Dirs + Total Size
  2. Create Folder = Opens dialog to create a folder with Name XYZ
  3. Delete '/Movies' = Opens a dialog with a warning "This deletes '/Movies' with all its contents"
  4. Copy '/Movies' to... = Opens a dialog with two dropdowns. 1st dropdown contains the list of shares and disks and 2nd updates to the folder structure of the selected share/disk. The dialog should contain a checkbox to allow "move" instead of "copy" as well.
  5. Create ZIP = Creates a ZIP of the directory (not visible in example)
  6. Upload = Upload a file through the browser (not visible in example)

I think this should be sufficient for the most users. 

 

Edited by mgutt
  • Thanks 1
Link to comment

Just adding a +1 to this thread as I have been using janky docker based file managers which have been causing permission issues for me. Would be nice to have an inbuilt manager. Not sure if it's at all possible based on how unraid works but it would be nice to be able to cut and paste large amounts of data without it having to be re-copied.

Link to comment
  • 4 weeks later...

After investigating some more, here are my findings:

 

  • Xpenology Docker is basically 3 years old. Not sure if it still works
  • Xpenology as a VM seems to work, but you can't load your unRaid shares directly. You have to mount them via virtual network and the speed is not optimal
  • Nextcloud Docker and external storage: You can directly mount your shares inside the Docker and move files via App or Webgui. So this is the best solution imho. Comes extremely close to apps for Qnap and Synology. 

 

  • Like 1
Link to comment
On 4/22/2020 at 7:07 PM, mgutt said:

Copy '/Movies' to... = Opens a dialog with two dropdowns. 1st dropdown contains the list of shares and disks and 2nd updates to the folder structure of the selected share/disk. The dialog should contain a checkbox to allow "move" instead of "copy" as well.

If copying/moving from cache or array disk, you can't allow the destination to be a share, and if copying/moving from a share, you can't allow cache or array disk to be the destination.

 

See my previous post about this here:

 

 

Link to comment
On 3/15/2020 at 1:46 AM, Sledgehamma said:

I really don't understand the negativity against this feature. Why shouldn't the solution be pretty or even elegant?

I think I do.  There are some security issues with this idea.  Running commands as an administrator (i.e. root) is dangerous, do you allow it? Run commands as a lessor user? Also, from my perspective, it's not totally clear how something like this should work.  File copies can take a long time to finish, do you block the web interface during this time?  Allow for interrupting the operation while in progress?  What about errors and recovery?  Do you expect undo?

 

Then there is the problem of increased support costs.  When you add a complex feature like this, you add to your future support costs for user questions, debugging and things like that.  Not to mention that it really kind of changes the complexion of what Unraid has traditionally been.

 

However, that doesn't prevent *somebody* from doing this very thing as a plugin, or docker to support the wanted features. In that way, the system owner can decide what security risks they are willing to take, which container or plugin meets their needs.  Given the available third party options, it seems to me that the Unraid solution is better off without this feature.

 

At least that's how I see this.

Link to comment

@kc4uai

 

1.) All commands will be executed by root. Why not? If Unraids mover is invoked, it is executed as root as well. As this is an internal feature I do not really see the downside.

 

2.) All processes need to be added to a queue. This means they are not executed on php script runtime. Instead php monitors only the process. QNAP and Synology are doing the same. They use the notification area to display the progress. No undo is possible. Errors interrupt where the error appears. This is a "simple" task. You use a command and let write the output to a log file. And if the command returns an error, your return this error to the user.

 

3.) Sell the file explorer as a separate feature or raise the price of Unraid if your fear costs.

 

4.) "Complexion": Why is it complex to create a zip/tar of a folder or to delete a file/folder? The only complex situation is (maybe) copying/moving files and if you know the problems this would be a one day job to solve (backend).

 

@trurl

 

5.) Reading and overwriting the same file on share and disk could be solved by checking the files inode number, before overwriting it. If its the same you return an error to the user.

 

6.) And if "mv" causes problems by moving files between two shares that uses different disks, then do not allow this. But I can not really understand why this happens. I was able to reproduce this problem and it does not move the data, instead it creates the same path on the source disk (that is not part of the target share). This sound like a bug in Unraid. I though a user share path is something like a mounted array of disks and all operations on such a target run through Unraid itself. I mean why is it possible to use "mv" to move files from the cache disk to a share, but not moving from share to share. And why does it not happen with "cp"? 

Edited by mgutt
Link to comment
39 minutes ago, mgutt said:

6.) And if "mv" causes problems by moving files between two shares that uses different disks, then do not allow this. But I can not really understand why this happens. I was able to reproduce this problem and it does not move the data, instead it creates the same path on the source disk (that is not part of the target share). This sound like a bug in Unraid. I though a user share path is something like a mounted array of disks and all operations on such a target run through Unraid itself. I mean why is it possible to use "mv" to move files from the cache disk to a share, but not moving from share to share. And why does it not happen with "cp"

This is due to a ‘feature’ of the underlying Linux where if it thinks source and target of a ‘mv’ operation are on the same mount point it first tries a ‘rename’ (for speed) and only if that fails does a copy/delete operation.

Link to comment
1 hour ago, itimpi said:

This is due to a ‘feature’ of the underlying Linux where if it thinks source and target of a ‘mv’ operation are on the same mount point it first tries a ‘rename’ (for speed) and only if that fails does a copy/delete operation.

Are you sure? For me it still looks like a bug in Unraid as "mv" shouldn't be able to create parent dirs, but after they exist on the target share (in this example on the cache), it creates them on the source share:

root@Thoth:~# ls /mnt/disk6 # used by share "Simone"
Marc/  Photo/  Robin/  Simone/  Software/  Video/  appdata/  isos/
root@Thoth:~# ls /mnt/disk7/TV # used by share "TV"
09/  AB/  CD/  EF/  GH/  IJ/  KL/
root@Thoth:~# ls /mnt/disk8/TV # used by share "TV"
MN/  OP/  QR/  ST/  UV/  WX/  YZ/
root@Thoth:~# ls /mnt/cache/TV
root@Thoth:~# ls /mnt/user/Simone
10GB.bin  Backup/  Janina\ und\ Sven/  PC.zip
root@Thoth:~# mv /mnt/user/Simone/10GB.bin /mnt/user/TV/foo/
mv: cannot move '/mnt/user/Simone/10GB.bin' to '/mnt/user/TV/foo/': Not a directory
root@Thoth:~# mv /mnt/user/Simone/10GB.bin /mnt/user/TV/foo/bar
mv: cannot move '/mnt/user/Simone/10GB.bin' to '/mnt/user/TV/foo/bar': No such file or directory
root@Thoth:~# mkdir --parents /mnt/user/TV/foo/bar
root@Thoth:~# ls /mnt/disk6 # were not created on disk6
Marc/  Photo/  Robin/  Simone/  Software/  Video/  appdata/  isos/
root@Thoth:~# ls /mnt/cache/TV # we can find them on the cache of "TV"
foo/
root@Thoth:~# mv /mnt/user/Simone/10GB.bin /mnt/user/TV/foo/bar/
root@Thoth:~# ls /mnt/cache/TV/foo/bar/ # empty?!
root@Thoth:~# ls /mnt/disk6/TV/foo/bar/ # mv created all subdirs = usually not possible!
10GB.bin
root@Thoth:~# 

 

Edited by mgutt
Link to comment

All user shares are at the same mount, /mnt/user. mv is the linux command for both rename and move. When you mv a file from one path on a mount to another path on the same mount, nothing is changed except the path as it is referenced by the file system. The actual file data goes nowhere, it is only the path of the file that is changed.

Link to comment
  • 1 month later...

+1 for this

 

Having switched from Xpenology/Synology to Unraid, the one thing I really miss is a well made built-in file manager. The current Unraid options are extremely clunky in comparison. Without previously using file managers from other NAS/Storage solutions like Synology and QNAP, it may not seem that way or seem like a downgrade, but it certainly is. 

Considering how underpowered CPU/RAM wise most consumer Synology is, and it has a great file manager. Compared to how powerful some of our Unraid setups are, I dont think resources will be an issue. Having a visually pleasing and modern built-in file manager would be a great addition to the Unraid solution.

  • Like 1
Link to comment
  • 2 weeks later...
  • 2 months later...
11 hours ago, Pourko said:

And 10 years later I will still not ike it.

It was a figure of speech. I dont think 10 years on UnRaid will even be relevant.

You cant keep supporting people who use ancient equipment without growing stagnant and stale.

I would support a GoFundme and strech goals just to get some often requested things rolling.

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.