LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-01-2013, 10:24 PM   #1
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
mounting second hard drive at boot time please advice


Hi I am setting up a second hard drive in my desktop and I added this line to /etc/fstab
Code:
/dev/sdb5/ /home/TroN-0074/Public/shares ext4 auto gid=TroN-0074,uid=TroN-0074 noatime 0 0
The drive get mounted but I cant create directories nor save files in it. What do I need to add to the entry to allow me control over the drive?
I will appreciate all advice. Thank you.
 
Old 02-01-2013, 10:49 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Debian, Mageia, and whatever VMs I happen to be playing with
Posts: 11,651
Blog Entries: 12

Rep: Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894Reputation: 2894
My guess is to set ownership to "user" and specify read-write. Here's a line from my /etc/fstab for a partition on my external. I can manipulate files on it just fine:

Code:
UUID=1655a198-15a7-471f-9e99-e3fc9fd92ca0       /media/sdb1     ext3    rw,user,auto    0    1
Also, if you are using the UUID, I don't think you need the /dev/ item with syntax like that above.

Just as a quibble, it might be worth considering mounting it to /media or /mnt, then symlinking the relevant directories from /home/[username]

Last edited by frankbell; 02-01-2013 at 11:28 PM.
 
1 members found this post helpful.
Old 02-02-2013, 12:59 AM   #3
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
I am pretty sure that the uid and gid need to be numbers, not names. Also, if it's an ext4 filesystem, you chan just chown the files on the drive and do away with the UID and GID alltogether.
 
1 members found this post helpful.
Old 02-03-2013, 03:13 PM   #4
TroN-0074
Senior Member
 
Registered: Dec 2011
Location: Michigan USA
Distribution: OpenSUSE 13.2 64bit-Gnome on ASUS U52F
Posts: 1,444

Original Poster
Rep: Reputation: 340Reputation: 340Reputation: 340Reputation: 340
Thank you for the advice. I found a solution to this problem by applying the following commands
Code:
sudo chown -R root:users /home/TroN-0074/Public/shares
Code:
sudo chmod -R ug=rwx,o=rx /home/TroN-0074/Public/shares
And the line I added to /etc/fstab looks like
Quote:
/dev/sdb5/ /home/TroN-0074/Public/shares ext4 auto noatime 0 0
Everything is good, Have a nice weekend
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
one hard drive refuses to mount on boot time mrgreaper Linux - Newbie 3 09-18-2009 11:08 AM
mounting a bad hard drive read-only (like the kernel does during boot) DeuceNegative Linux - General 3 01-02-2008 10:48 PM
Ubuntu: Installed to external hard drive; boot to primary hard drive gives error 22 dcorb62 Linux - General 7 09-05-2007 12:28 AM
Very slow boot time after hard drive problems. Mountain Man Ubuntu 4 07-01-2007 05:56 PM
hard drive weird noise during boot ...time for an update?! aldimeneira Linux - Hardware 6 03-16-2006 11:19 AM


All times are GMT -5. The time now is 05:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration