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 - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-01-2007, 09:44 AM   #1
RazielX
LQ Newbie
 
Registered: Sep 2004
Location: St. Louis, MO
Distribution: Ubuntu
Posts: 21

Rep: Reputation: 0
External Hard Drive Write Permission Problem


Hi everyone. I have an issue with a new external hard drive I bought the other day. I split it into two partitions and formatted them both to use the ext3 file system. However, I only have read permissions to the drives. When I run mount, I get this:

Quote:
/dev/hdb1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
/sys on /sys type sysfs (rw,noexec,nosuid,nodev)
varrun on /var/run type tmpfs (rw,noexec,nosuid,nodev,mode=0755)
varlock on /var/lock type tmpfs (rw,noexec,nosuid,nodev,mode=1777)
procbususb on /proc/bus/usb type usbfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
devshm on /dev/shm type tmpfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
lrm on /lib/modules/2.6.20-16-generic/volatile type tmpfs (rw)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/dev/sda1 on /media/Music type ext3 (rw,nosuid,nodev)
/dev/sda2 on /media/Samba-Share type ext3 (rw,nosuid,nodev)
/dev/sda1 and /dev/sda2 are the two partitions of the external hard drive.

I also tried chmodding both partitions to include write access to no avail. Could anyone help me with my dilemma?
 
Old 09-01-2007, 09:52 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Use the "chown" and "chmod" commands as root to change the ownership and permissions of an ext3 filesystem.

I would recommend using the "user" option in your /etc/fstab entry. Also use either a LABEL=<label> or UUID=<uuid number> entry instead of a device. An external USB or Firewire drive may use a different device the next time you reboot.

Here is an example of an XFS filesystem on an external drive:
Code:
udevinfo -q env -n /dev/sda1
ID_VENDOR=Maxtor_6
ID_MODEL=Y250P0
ID_REVISION=YAR4
ID_SERIAL=Maxtor_6_Y250P0_0332005C
ID_TYPE=disk
ID_BUS=usb
ID_PATH=pci-0000:00:02.2-usb-0:1:1.0-scsi-0:0:0:0
ID_EDD=int13_dev81
ID_FS_USAGE=filesystem
ID_FS_TYPE=xfs
ID_FS_VERSION=
ID_FS_UUID=b545812a-57af-43e8-bbd8-f9b43dd25fc8
ID_FS_LABEL=NetDisk
ID_FS_LABEL_SAFE=NetDisk
My fstab entry looks like this:
Code:
LABEL=NetDisk   /media/NetDisk  xfs     defaults,user,noauto 0 0
The user lets me as a normal user mount the drive without using sudo. The noauto will prevent the system from stalling during a reboot if the drive isn't available.

As an alternative you could rely totally on the udev/hal system to automount the drive when you insert it.
 
Old 09-02-2007, 09:45 AM   #3
RazielX
LQ Newbie
 
Registered: Sep 2004
Location: St. Louis, MO
Distribution: Ubuntu
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks for your help! What ended up fixing my problem was putting the following lines into my fstab:

Quote:
# Entry for Music
LABEL=Music /media/Music ext3 defaults,user 0 0
# Entry fo Samba-Share
LABEL=Samba-Share /media/Samba-Share ext3 defaults,user 0 0
I took out noauto because I want them to mount on boot. Afterwards, I chmodded both drives (/media/Music and /media/Samba-Share) to give everyone write access.

Thanks again for your help!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't Write to External Hard Drive Sloppyunderfoot Linux - Hardware 2 08-18-2007 10:05 PM
External Hard Drive does not give me the permission to write erockallstar Linux - Newbie 22 01-29-2007 03:40 PM
Not able to set write permissions on external hard drive. jpen8560 Linux - Hardware 19 03-22-2006 10:44 AM
Write permissions for external hard drive kg4ysy Linux - Hardware 1 05-19-2005 05:36 AM
Write to external USB hard drive Rob Roye Linux - Software 6 07-06-2004 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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