 Okay, thank you for watching. I honestly can't believe I'm doing a video on this topic because it's so simple But it's come up in conversation a number of times in the IRC channel and that's dragging and dropping files in a file browser and It's I have people come in say oh in Linux you can't drag and drop files from one folder to another because it tells you you can't and and that's Ridiculous and completely not true What might make a difference is? Permissions, so we're gonna look at this a little bit here. Let me go ahead and open up Thunar. Thunar is a file browser that I'm using It's the default file browser for Xfce desktop So let me just give you some examples here So right now over here on the left you can see my devices and you can see flip video So I plugged in my flip video camera and if I click on it It mounts it so it wasn't mounted when I first put it in and it's mounted now You could tell it wasn't mounted because it was grayed out kind of like this 16 gig volume right here So anyway, I can right-click this and you can see I can create a folder and the folder is created So I have permission to write to this This folder to this device Now if I was to click this eject button, you can see it disappears over from over here so let me go ahead and close this and There is a difference between ejecting and Unmounting something so what we just did we ejected it so if I list out my devices here SD Whatever you can see that I have devices SDA SDB and SDC the flip camera was actually SDD So it's gone now because ejecting is like even though I physically haven't pulled it out of the computer yet I ejected it so it thinks it's ejected. It's like ejecting a CD-ROM So if I pull up the camera and plug it back in and I list this out again Give it a second here. There we go. It's actually showing up as SD E now So It's there so that's the difference between ejecting and unmounting I want to point that out first off because if I unmount something you'll still see it here It's just not mounted, but when you're ejecting it, it disappears completely Okay, so again, I can open up my file browser again, and it's right there and I can click it, but I'm not going to and again you can see it's grayed out now That means it's not mounted you can set it up to automatically mount everything I don't recommend that but you know, it's your system. You can do whatever you want Let's say I wanted to mount it I can go pseudo mount And I can tell it what device and it's going to tell me After I type in my password because you do need to have pseudo permission So we'll talk about that more in a moment to mount a device like this So I'll hit enter. It says can't mount that it can't be found in fstab Fstab however you want to say it And that's a file where you can tell your computer when certain devices are plugged in what to do with them So if there's certain devices like the flip camera if I want to automatically have that be mounted I can have it automatically mounted and If a file is in there, and I tell it to pseudo mount it it will know where to mount it to but since I Don't haven't set it up set up that device It's not seeing it. So I need to tell where I want to mount it So pseudo mounts and I'll just put it to my MNT file because nothing is there right now So my MNT folder Now I can CD into that folder. I can list out you can see it's the same file If I try to create a file by going touch one and hit enter it's gonna say permission denied. Okay. Well, let's open up Thunder so again the same Device that we were looking at before I can go right clicking you'll notice that create folder and create documents are grayed out Okay Because I don't have permission. This is not a drag-and-drop issue. This is a permission issue I mounted it as pseudo so to write to it you need pseudo or root permissions So depending on how you mount it you may or may not have permissions to write to it and this all depends on I mean, let's say you had ten people that logged into this computer You don't want everyone to be able to access your device when you plug it in. You know, there's there's different scenarios there But it's all up to you and how you have your system set up So basically if I was to open up another Thunder screen here and I was to put one here and one here and I was to go to I guess my home folder here and I try to drag this file over It's not gonna work. This is what people are talking about. They're going. Oh, it's it's not working I can't I can't drag and drop files now You notice I can drag this way because I have permission to write to my home directory I don't have permission to write to this because of the way I mounted it and doesn't have to do a drag-and-drop thing It has to do with permissions and this is a security feature So I can close both of these and I can go pseudo you mount and I can unmount That and it says it's busy because I'm in that folder right now It won't let you unmount it if you're working in that folder So let me move out of that folder and I'll pseudo you mount to unmount it and there we go Okay, so now again, I can open up fun are and now you can see the flip video cameras back here and again if I open it up here and I'll un-maximize that Open up a new screen so and I'll go to my home folder here. So now that I mounted it this way I Can drag and drop over here? See so it all has to do with how you mount it and what permissions you give now I also want to point out that if I run the mount command without anything else it tells me you know list of all my mounted devices and If we look at the bottom here You can see the last device mounted and it also tells you right here rw. That means that it's readable and writable Because not only do you have permissions when you mount something? But you can also mount something such as this system up here as our oh meaning read only in that case Even if you're root, you're not able to write it right to that device unless you remount it Which if you root you should be able to do so this is Something else you need to think about are you mounting it as rewrite usually unless you say to mount it as read only It's going to mount as read write But then again, you need to have each user needs to have their own permissions to access that file now You might be going okay. Why do I need to? pseudo To mount something but I don't inside something like fun are and sometimes maybe you're running fun are and you go to mount something It tells you don't have permission now. I'm not gonna get excuse me. I'm not going to get into that in detail But basically you need to set it up to allow fun are to mount stuff Basically, you're you're going to be giving a process you're going to be running a process basically with a group permission to mount stuff and So I have permission as pseudo but you can give different users different permissions I can give let's say I have John and Jim both accounts on the computer I can give John permission to mount stuff and I can tell Jim he can't he doesn't have permission to So it all depends on how you again how you have things set up all about how you have your system set up now When you're in the shell here again, we said pseudo mount you could mount devices that way if you look in your repositories and I'm going to use aptitude For Ubuntu users, I'm going to do app cache search and I'm going to do P mount And I'll list out files here and you can see there's a program called P mount and right here It says mount removal devices as normal user. So if you wanted to mount stuff from the shell and have Normal users permission to write to that you'll want to install P mount and use that so there's an option for you Um, so another thing that you can do Open Thonar up again Thonar is a nice lightweight file browser But what you can do is if I was to Let's go ahead and go back to our shell. I'm gonna go Well Again, let's oh well clicking it that way is going to eject it Let me unplug it and plug it back in and again You can use the eject command from the shell to do a similar thing if you eject you can eject a CD run drive It will actually pop out the CD run. Let me go ahead and pseudo mount device SD E1 And I'll get it mounted at MNT And I'll open up Thonar there and again if I click here Let's go to that folder And if I right-click I can't create files, which means I don't have permission to write there and If I open up another browser here, so the one on the left is Running or sorry. I'm getting ahead of myself So over here the one on the right is the device and I mounted it as pseudo again If I right-click I don't have permission to create documents or folders And if I try to drag to it, I can't drag to it Okay, so Let's say you have something mounted as that and you want to be able to drag and drop stuff to that folder But it's already mounted with escalated privileges escalated higher privileges What you can do is we have a few different options. Let me say let me go to my MNT folder. I can do pseudo Thonar and It normally would ask for a password there since I just typed it in it's already stored But you can see I now have Thonar running as root here, so If I was to tab over here You can see I can create folders and documents and I can drag to it And I'll tell me if I already exists over there. Just skip it. I'll drag this over there So I can drag files and I can also delete files But it doesn't work the other way so if I was to come here and go MNT so here same folder and if I was to go to Folder where I have some files. So home And I was to try to drag this file over here I can't the thought the the screen that you're dragging to has to have the permissions to write because it's the file doing the writing this is the same thing in the shell if I was to try to CP or MV copy or move files to a folder I need to run pseudo or have permissions to do that and Basically, this is running as that So let's say you don't want to write pseudo Thonar every time you want to open up a screen like this Perfect. No problem. We can do that. So here's Thonar again. We still have that drive mounted as Read only or not mounted as read only but regular users non root users Don't have permission to write to it. They only have permissions to read from it Excuse me again if I go up here to edit and this is in Thonar And if you're running Nautilus Nautilus has an option I don't know if it's built-in or if it's a plug-in and has something that does this I know it does I think KD does as well But for Thonar if we come here we go edit and we go configure custom actions We can make our own Actions and I recreate one I'm gonna delete it here so I can show you how to make it All right, we can create our own custom actions that do pretty much anything So what I'm gonna do here is I'm gonna say plus to create a new one I'm gonna call it open as Root and I'm gonna give a description as open folder as root And what we're gonna do is we're gonna go Gks you that's just a GUI front-end for SU instead of piping your password at the shell It's gonna give you a GUI interface type your your password in it So we can start any program we want we're gonna start Thonar We're in Thonar. We're starting Thonar and we want to open what well down here It gives you a list of options and as we can see is percent N is the selected files file names, so I'm gonna do percent capital N and I can give it an icon as well if I wanted to in fact, let's do that. We'll click on icon I'll say show all icons. You can also choose images that you have and I'm just gonna pick something Something that would tell me Let's do let's do a happy face So so we'll have an icon and we're gonna click on conditions here instead of text file Which is what choose by default. We're gonna choose directory We're gonna click okay and click close now again. I don't have permission to write you can see File folder. I can also say open as well So I do it if I click over here in the open area I can open the current folder if I click over here and do it it will open up that Folder, so let me go ahead and right click here and say open as root. It's running gksu It's gonna ask me for my password, which I'll type in I can ask it to remember for a certain amount of time I'm just gonna leave that unchecked for now click okay, and I Got an error We're getting fish on file. I guess you have to click on a file I thought you could click on the background there my mistake. I'll click on this folder here I'll say open as root and I'll type in my password Think I typed it right there. We go so it opened up that and I can always up directory to here So now anytime I click on a folder you have that option. I don't know why it gives you that option there And it doesn't work. Let me try something and click in here and go open that Yeah, so I guess clicking on the background there doesn't work You actually actually have to click on a folder icon, but either way once you add that you can easily always open as root Type your password you can ask it to remember for the session that we don't have to keep typing it in and once you do that Now I can just like before I can go to my home directory over here and I can drag a folder file just like that to there So that's how you do it in Thunar or yeah Thunar Like I said, Nautilus and KDE have options like that either already built-in or their plugins check the repositories I know they're there because I used to use Nautilus all the time But I actually use a different file browser most time. I actually really like a file browser. It's very similar to Thunar it's called PC man FM PC man file manager you can see it looks just like Thunar and I tell you Two things I like about this One if I hit F3 it can split the screen so that I don't have to open up a new window Every time I want it to you know see two files or drag and drop something so I can go you know Into my pictures folder here and I can drag a file over there without having to open up a separate window It's just one window and I can hit F3 again I mean it's nice. It only does a double split and does tabs like don't remember Thunar does tabs another thing is once I run it let me go ahead and pseudo you mount My flip camera again. I can't be in that folder while doing that. Okay Now that I have PC man FM running If I unplug my camera and I plug it in It will pop up this. Do you want to open it up? That's nice. I like that I don't like it. You know it automatically opening it, but I can have different options here and that's nice either way It's just a little thing. I like about I like it. It's lightweight very similar to Thunar with a few extra features in there But I haven't really looked into if I right-click. There's no open as route that I can see and I'm 100% sure that you can enable some sort of functionality to open folders as route By clicking like that, but I don't see that option. So again, if you are using PC FM the PC man file manager You can always pseudo PC man FM And again, it would ask for a password there normally But it's already has my password storage. I already typed it into that shell and here it is open as route So now it doesn't give you a big bar across top saying that you're running as route to warn you But you can see one it doesn't have all my settings for my drives over here like I do in my regular account And I think maybe this exclamation mark. Yeah, you're in super user mode So now if I wanted to I can you know go to Mnt, which I don't have that drive mounted yet Well, the another example is just my route directory. Normally, I don't have permission to write there I can drag and drop files there now So and I complete stuff from there. So it's all about permissions There are many different file managers out there. Most of them support drag-and-drop. There are a few very very lightweight ones I can't remember the names of them. I know, you know the shell. There's a midnight commander I think there's a gooey one similar to that And then there's also oh now I'm going back 10 years when DSL Linux Was around what still kind of around not really though They had a lightweight file manager that didn't have drag-and-drop It had a split screen and you would select a file on this screen select a file on this screen Then you go copy that way or copy that way or move this way or move that way There were buttons down the middle, but if you're running like I said Nautilus Conqueror Dolphin is dolphin and conqueror the same thing. I don't know. I don't use KDE anymore Thunar or PC FM and I'm sure there's a few others They all have drag-and-drop and if you're having issues dragging and dropping to a certain folder or device It's a permission thing not a drag-and-drop thing. It's it's basic computer functionality And the same is somewhat true in the windows now if you go back You know more than 15 years ago back to before Windows XP You know Windows 98 95 3.1 that sort of stuff which wasn't even an operating system. It was an operating environment for DOS actually Prior to Windows XP there weren't any File Permissions on those systems. So if you had multiple users every user could access every other users Files it wasn't till XP and they started implementing the NTFS file system because these permissions are kind of You know integrated into the file system themselves that you do have some permissions, you know now most people when they're running Windows they're pretty much running as a Administrative user, which is really not secure newer versions of Windows do have some Things that make you feel like there's permissions, but there are I'm pretty sure in Windows You know I use I have a Windows computer at work that I have access to and I play around with sometimes and it's running Windows 7 There are full files and folders that you try to access and it says you need to be root and you right-click and you say open or run as Administrator and it's funny because even if you're already administrator it asks you to do this It's like it doesn't realize that you're administrator So it's it's pretty much the same in Windows, although a much more looser security if we can put it that way But if you don't have permission to write to a folder or device You need to change the permissions for that user or change users. It's it's the same and again all depending on how you mount it what permissions a user has and And you know in which way you you mount it so That's it a very Basic functionality again if I can split the screen here I can obviously drag and drop files and it's actually in this case, you know, there's moving files where if I Open up this folder so I drag this over here. Oh, there's already that file there We delete that this is one more thing that might confuse you just be clear about this if I drag this over here You notice it made a copy. It's there and there. Look. I'll drag this read this file Oh, that's already there if I drag this core file over here It's a bigger file. It copied it, right? Well if I come in here and I go to let's say I Folder pictures and I drag it. Oh now it moved it. Look it. We're moving files. The reason for that is We're on the same drive here by default And I think most file browsers are gonna do this If it's the same device if it's the same hard drive, it's assuming you want to move it If it's a different like I'm copying to a flash drive SD card or external hard drive It's going to copy it because it's going to think well you maybe want to keep a copy on your on your You know the other drip drive so that's nothing to think of oh and one last thing while talking to people online about this They were having issues writing to stuff and I asked if they have the switch. They were talking about an SD card Full-size SD cards not the many ones have a switch on the side that usually have the word lock next to it If you slide that one way it makes that device read only and you will not be able to write to it as Root or however you mount it you can't mount it as read write if that Slide that little switch is slid into the lock position And I have had SD cards and certain readers that are really tight and SD cards Where I slide it in there and every time I slide it in it pushes into the lock And I actually would have to put tape over that little Tab there, so that's another thing USB drives don't usually have that But if you're working with a full-size SD card and you're having trouble writing to it Make sure that you slide that little that little tab into the unlocked position Otherwise you will only be able to read to it no matter what you do on your computer And that's about it Kind of a long tutorial for a simple topic But I think it had to be said because this was confusing some people I thank you for watching and as always I hope that you have a great day Please visit my website films by Chris comm Chris the K link in description again. Have a great day