Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
QUESTION: if I mount it as "read-write" and there was malware/ RAT on my computer - could the RAT get on there "at-will" or would I first need to open a file for the RAT to execute to any files?
Asking because, as you know, in windows, just connecting a usb to an infected computer will allow the RAT to infect the usb without ever opening anything on the usb. I know linux is very different, but to make sure.......
That's great. So what do you intend doing with this disk? Are you truly only ever going to read from it, never write to it? Is the data on the device owned by user/group 1000?
Also, given that you manually mounted the device, can you paste here the actual command that you used? Thanks.
In reply to your previous question, umount /dev/sda1 /exthdd produces an error because it only needs one parameter in this case. Your umount /dev/sda1 works perfectly, leaving no file system mounted at /exthdd. When the mount command then tries to unmount the filesystem mounted at /exthdd, it finds none.
QUESTION: if I mount it as "read-write" and there was malware/ RAT on my computer - could the RAT get on there "at-will" or would I first need to open a file for the RAT to execute to any files?
Asking because, as you know, in windows, just connecting a usb to an infected computer will allow the RAT to infect the usb without ever opening anything on the usb. I know linux is very different, but to make sure.......
thanks.
Personally I feel that you are being over-cautious by mounting the external hard drive as read-only, to the detriment of ease-of-use. As long as you adequately protect your computer from infection (not browsing with root privileges, tightening up security related to any internet-facing servers you're running on the machine, occasionally running malware checks, etc.) then your chances of catching something are pretty small in Linux anyway. In saying that, in general a RAT (I haven't heard of that term ) will need to be in a program that's executing to do damage. This is the same for both Linux and Windows (contrary to your statement above - what you say would only happen if autorun on a Windows computer were enabled and effectively that opens a program or programs on the USB stick).
Out of interest, why are you so worried about RATs?
I did run the command cited by H...it is 2 messages up, the output, that is.
How sure am I that this is sda1? It is definitely the only "1.8T" drive connected to my computer.
Yes I edited my post to note that between my start of composing and posting it, you had done that, so I updated. No biggie and I'm glad you have the understanding of size of drive so as to understand you had the drive letter correct.
Quote:
Originally Posted by lq99
How do I find the directory under exthdd?
Well I find it sometimes difficult using the file manager. But under the terminal, just cd to /exthdd and perform an ls, or you can do "ls /exthdd"
Under the file manager you sort of have to go up, up, up until you get to the root / of your system. It's not always easily intuitive.
Just to note. It mounted under /exthdd, there is no /media directory involved, for whatever reason. This is not some draconian error. It is typical for auto-mounts to use the /media directory, but any mount can go to any directory. For instance you can mount to your home, or a sub-directory off of your home providing you do the mount command the correct way.
I agree that you're being overly cautious about some form of virus or other getting onto your USB mounted data drive.
After all, it appears to be a large data only drive. Therefore you probably do want it to be RW.
One would think if you had this much paranoia that you'd instead be more worried that something like that would get into your root file system and corrupt your boot versus mess up your data.
Meanwhile:
EXE files do not run on Linux, or that is to say Windows EXE files do not.
I have yet to run into nefarious executable files on Linux, but then again I don't randomly run stuff without knowing what it is or where it came from. Further, stuff does not auto-run on Linux like it may for Windows.
Safe browsing is really a key. Block scripts, use ad blockers, don't click on stuff you find suspect and if it catches you by fast popping up and then going crazy, kill the web browser process ASAP, clear your cache, cookies, etc, optionally restart your Linux system, and then move ahead and don't revisit that site.
It doesn't matter how I mount it (media, exthdd, ro,noexec, rw) ---- mounted it every way --- still can't access it; still can't find it in any directory.
Had RATs (remote access tools for remote access to your computer) in windows and it corrupted many files and I still have many files on exthdd which may/ almost definitely are infected with malware; too many to get rid of so I try to keep the RATs in their cages.
Still can't access the exthdd. Yes, I have looked in other folders/ directories other than just 'media,' but I still do not find anything.
Last edited by lq99; 03-15-2018 at 06:10 PM.
Reason: error
.......interestingly enough, when I mount my 16GB usb flash, it does show under devices, but I can't access it either. All that shows there are 2 folders with X's thru them, both of which are not accessible.
But when i connect my other exthdd's, they show, are accessible, and I mount them as RO.
RO: If I just want to open and read files/ docs, or I want to copy some of them to my desktop, there is no reason to mount as RW. I can do all of that in RO.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
For umount you use either the mount point OR the device file, not both. Maybe the drive came unmounted. Did you check using the mount command. Mount without options just lists what's mounted. If you want to access a mounted volume in a file manager, you have to navigate to the mount point, which is a directory, and there be all the files. In you case '/exthdd'.
awesome: yes, there is no "exthdd" directory anywhere; and yes, I have tried both at the same time, plus each individual - I usually just do it as a precaution to cover all bases; thanks for letting me know - won't do that in the future!
rt: actually, the main thing said in this whole discussion was that the problem was the way I was mounting the drive; so my points about how I am mounting the drive have a purpose.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.