LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-15-2018, 12:29 PM   #16
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925

Quote:
Originally Posted by lq99 View Post
Either way, I need to copy and paste files to it and I am not able to do that...
Quote:
Originally Posted by lq99 View Post
I purposely mounted it as read-only so if there is any malware on my computer, it will not transfer over to the my exthdd.
That is why you can't copy and paste files to it.
 
Old 03-15-2018, 12:38 PM   #17
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
fsck -n /dev/sda1
fsck from util-linux 2.29.2
e2fsck 1.43.4 (31-Jan-2017)
exthdd: clean, 1767159/122101760 files, 366952336/488378390 blocks
 
Old 03-15-2018, 12:42 PM   #18
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-15-2018, 12:46 PM   #19
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by lq99 View Post
fsck -n /dev/sda1
fsck from util-linux 2.29.2
e2fsck 1.43.4 (31-Jan-2017)
exthdd: clean, 1767159/122101760 files, 366952336/488378390 blocks
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.
 
Old 03-15-2018, 12:57 PM   #20
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by lq99 View Post
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?
 
Old 03-15-2018, 03:38 PM   #21
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Quote:
Originally Posted by lq99 View Post
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 View Post
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.
 
Old 03-15-2018, 03:43 PM   #22
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
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.
 
Old 03-15-2018, 06:04 PM   #23
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-15-2018, 06:09 PM   #24
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
.......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.
 
Old 03-15-2018, 06:12 PM   #25
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-15-2018, 06:39 PM   #26
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
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'.
 
Old 03-15-2018, 07:28 PM   #27
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
lq99,

If you can't stay on point about this particular mount issue and try things several people have suggested. I doubt we can provide much help.

Please check the output of:
Code:
ls /exthdd
And let forum members know if you see your files.

Discussion about how you wish to mount drives seems to be obfuscating your original question.
 
Old 03-15-2018, 07:34 PM   #28
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
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.
 
Old 03-15-2018, 07:35 PM   #29
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
ls /exthdd
......doesn't do anything but go from # to next line #
 
Old 03-15-2018, 07:36 PM   #30
lq99
LQ Newbie
 
Registered: Mar 2018
Posts: 16

Original Poster
Rep: Reputation: Disabled
awesome: i had been mounting it mainly as "media" since I know that directory IS there; I have not seen "exthdd" at all...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't update to F26 because of chromium-libs-media KenJackson Fedora 4 08-01-2017 12:47 PM
Why so many "tmpfs" mounted? One is mounted on /media -- why? SharpyWarpy Fedora 6 03-13-2012 12:15 AM
No partitions mounted in /media when using Xfce terry-duell Fedora 5 04-02-2008 12:22 AM
How to write to automatically mounted removable media royeo Linux - Newbie 3 09-19-2006 05:34 PM
Unknown mounted media Suse 10.1 usaf_sp SUSE / openSUSE 9 06-23-2006 01:28 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration