LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 06-06-2017, 09:50 PM   #1
Aspirer
Member
 
Registered: Nov 2016
Distribution: Linux mint 18 3 Cinnamon 64 bit
Posts: 34

Rep: Reputation: Disabled
Attempting to get an external Hard Drive to work for storage


I have a used 500 GB external hard drive that I've been trying to use under Linux mint 18 1... I'm locked out of it for some reason. I can not drag and drop files into it, The "create folder" option is grayed out on the File menu. Why can't I write to it!?

Click image for larger version

Name:	Morris's.png
Views:	17
Size:	249.4 KB
ID:	25198


I've goggled my fingers sore, but still have no idea what I need to do to get it working...

I first deleted the existing partition... Then...
In gparted I clicked on Device>and Created a Partition Table.
Next I created a new partition on sdb by going to Partition and selecting the ext4 partition...
This was done in Linux 18 1... Cinnamon version 4.4.0-53-Genetic
Attached Thumbnails
Click image for larger version

Name:	500 GB  disk.png
Views:	16
Size:	104.9 KB
ID:	25197  

Last edited by Aspirer; 06-06-2017 at 10:16 PM. Reason: Added more info.
 
Old 06-06-2017, 10:22 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,317
Blog Entries: 28

Rep: Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140Reputation: 6140
With the drive connected, what is the output of these commands?

Code:
fdisk -l
cat /etc/mtab
You may have to issue the commands as root.

Be sure to surround the output of the commands with "code" tags, which become available when you click the "Go Advanced" button at the bottom of the "compose post" window.
 
Old 06-06-2017, 10:34 PM   #3
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Listen carefully. With the external hard drive connected, powered on and mounted run the following command:
Code:
sudo chmod 777 /media/marz/500 GB Storage
That should do it.
 
Old 06-06-2017, 11:02 PM   #4
Aspirer
Member
 
Registered: Nov 2016
Distribution: Linux mint 18 3 Cinnamon 64 bit
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by frankbell View Post
With the drive connected, what is the output of these commands?

Code:
fdisk -l
cat /etc/mtab
You may have to issue the commands as root.

Be sure to surround the output of the commands with "code" tags, which become available when you click the "Go Advanced" button at the bottom of the "compose post" window.
I am not familiar with root... Never heard of it before..
Attached Thumbnails
Click image for larger version

Name:	101.png
Views:	8
Size:	97.7 KB
ID:	25199  

Last edited by Aspirer; 06-06-2017 at 11:20 PM.
 
Old 06-06-2017, 11:28 PM   #5
Aspirer
Member
 
Registered: Nov 2016
Distribution: Linux mint 18 3 Cinnamon 64 bit
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kilgoretrout View Post
listen carefully. With the external hard drive connected, powered on and mounted run the following command:
Code:
sudo chmod 777 /media/marz/500 gb storage
that should do it.
Click image for larger version

Name:	102.png
Views:	11
Size:	126.9 KB
ID:	25200
There is a lot that I am not familiar with here, and feel that I am not understanding like I would like too...

Last edited by Aspirer; 06-06-2017 at 11:31 PM.
 
Old 06-06-2017, 11:40 PM   #6
Aspirer
Member
 
Registered: Nov 2016
Distribution: Linux mint 18 3 Cinnamon 64 bit
Posts: 34

Original Poster
Rep: Reputation: Disabled
There is something wrong on my end with the reading that I am getting from garted reading of the drive... So I will post more when I get it sorted...
 
Old 06-07-2017, 12:10 AM   #7
Aspirer
Member
 
Registered: Nov 2016
Distribution: Linux mint 18 3 Cinnamon 64 bit
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Aspirer View Post
There is something wrong on my end with the reading that I am getting from garted reading of the drive... So I will post more when I get it sorted...
OK got that sorted...
I am assuming that according to this screenshot that the drive is mounted...
Click image for larger version

Name:	110.png
Views:	20
Size:	94.1 KB
ID:	25201

Last edited by Aspirer; 06-07-2017 at 12:15 AM.
 
Old 06-07-2017, 12:22 AM   #8
Aspirer
Member
 
Registered: Nov 2016
Distribution: Linux mint 18 3 Cinnamon 64 bit
Posts: 34

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by kilgoretrout View Post
listen carefully. With the external hard drive connected, powered on and mounted run the following command:
Code:
sudo chmod 777 /media/marz/500 gb storage
that should do it.
Click image for larger version

Name:	111.png
Views:	12
Size:	208.8 KB
ID:	25202
 
Old 06-07-2017, 05:52 AM   #9
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
Linux is case sensitive. You ran:
Code:
sudo chmod 777 /media/marz/500 gb storage
But you should have run:
Code:
sudo chmod 777 /media/marz/500 GB Storage
If interested, I can give a more complete explanation of what you are doing. Basically, you have a permission problem which is typical when you format a new drive to a linux file system. You have to change the permissions on the partition for your external hard drive so you have write access on the partition. You do that by changing the permissions on the mount point of the external hard drive with the chmod command while the drive is mounted. We may be having some trouble determining the mount point of the external drive. From your screen shot it appeared to be "/media/marz/500 GB Storage". You have to be sure the external drive is powered on and mounted when you run the command or it won't work.

Edit: Reread your posts and screen shots and I think I see your problem. When you created the partition you also created a label for the partition which has spaces in the the label name, namely "500 GB Storage". When the bash shell encounters spaces like that it stops and tries to run the command on a file named "/media/marz/500" which does not exist. It's generally a better practice to not put spaces in partition labels for this reason. You can workaround it by running:
Code:
sudo chmod 777 /media/marz/500\ GB\ Storage/
Try that and see if it runs.

Last edited by kilgoretrout; 06-07-2017 at 07:33 AM.
 
Old 06-07-2017, 08:46 AM   #10
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,499

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
You need to understand first that Mint and most any Linux system is created as a multi-user system and that in most cases, the standard user does not have full access to anything outside the /home/user directory (in your case /home/marz). You can give yourself access by either changing the owneershipt or changing the permisssions and in your case, changing the ownership would be simpler and cause fewer potential problems. Also, as pointed out above, when you are running commands in a terminal you should not have spaces in directory names. To avoid the problems you had in running these commands, put quotes around the command.

The fdsik -l command got an error because you tried to run it as a user not root using sudo.
Change the ownership of your directory mount point for the external drive partition:

Code:
sudo chown -R marz "/media/marz/500 GB Storage"
As pointed out above, case sensitivity applies so if it is "GB" not "gb" or "Storage" not "storage" you need to enter that correctly. The above would give the user "marz" full read/write access to that partition.

Last edited by yancek; 06-07-2017 at 08:53 AM.
 
Old 06-07-2017, 10:09 AM   #11
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
adding to what @yancek said

this is what I do, if it is not NTFS which requires ntfs-3g, then using root or sudo I change it,
Code:
chown user:group /path/to/hdd -R
the group is added due to one then can get access to it if they belong into that group as well.
 
Old 06-07-2017, 12:11 PM   #12
kilgoretrout
Senior Member
 
Registered: Oct 2003
Posts: 2,987

Rep: Reputation: 388Reputation: 388Reputation: 388Reputation: 388
yancek, see my post. He has spaces in his partition label name. Mint's auto-mounter is creating a mount point at /media/marz/ with that partition label name complete with spaces. This is causing the error he's getting. You need to use the backslash escape character to get around the problem.
 
Old 06-07-2017, 02:12 PM   #13
Aspirer
Member
 
Registered: Nov 2016
Distribution: Linux mint 18 3 Cinnamon 64 bit
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thumbs up

Quote:
Originally Posted by kilgoretrout View Post
Edit: Reread your posts and screen shots and I think I see your problem. When you created the partition you also created a label for the partition which has spaces in the the label name, namely "500 GB Storage". When the bash shell encounters spaces like that it stops and tries to run the command on a file named "/media/marz/500" which does not exist. It's generally a better practice to not put spaces in partition labels for this reason. You can workaround it by running:
Code:
sudo chmod 777 /media/marz/500\ GB\ Storage/
Try that and see if it runs.
Thank you kilgoretrout...
Click image for larger version

Name:	201.png
Views:	13
Size:	44.6 KB
ID:	25207
Solved...

Thank you also to the rest of you who contributed to this thread...

Last edited by Aspirer; 06-07-2017 at 02:17 PM.
 
Old 06-07-2017, 06:01 PM   #14
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,499

Rep: Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489Reputation: 2489
Quote:
You need to use the backslash escape character to get around the problem.
Putting quotes around the command accomplishes the same thing without the escape character on every Linux I've used.
Giving read/write/delete permissions to anyone with access to the computer (777 permissions) is generally not a good idea other than for purposes of testing or perhaps some insignificant files/directories. Doing it for an entire partition can lead to all kinds of problems is the user isn't careful.
 
Old 06-07-2017, 06:02 PM   #15
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
you could also just change the name of it to 500_GB_Storage or 500-GB-Storage or 500GBStorage etc...
 
  


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
[SOLVED] Getting an external used Hard Drive to work? Aspirer Linux - Hardware 30 06-05-2017 10:30 PM
how to make external hard drive to work as internal hard drive chaitanyajun12 Linux - Hardware 6 05-01-2011 02:29 AM
Command to configure a External Hard drive in ext2 as a secondary storage device. dayo_centos Linux - Newbie 1 03-18-2011 07:47 AM
I can't get ubuntu to work with my external hard drive! Kingrames Ubuntu 7 11-14-2005 10:35 PM
External storage for Linux/Windows: Samba or USB 2.0 attached Hard Drive? SparceMatrix Linux - Hardware 1 02-04-2005 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:42 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