Can't Write to External Hard Drive

Asked by Ron

So this is really strange:

I have an external hard drive which I have just formated as ext4. But for some reason I can't write to it. I wonder why? I was able to do that earlier in the day. But then for some reason I had to erase the entire drive and reformat it again as ext4. Now I can't write to it. Can anyone help me with this? I can open the external drive in my Ubuntu system but for some reason I can't write anything to it. I can't backup any data. Why is this?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu util-linux Edit question
Assignee:
No assignee Edit question
Solved by:
mycae
Solved:
Last query:
Last reply:
Revision history for this message
Tobias (ulbricht-tobias) said :
#1

Hi Ron,

try to find out, if you have the right write permission set on the drives directory:
If you open "Places" and click on the disk,you should see at least a "lost+found" folder.
Go to a terminal (apps->tools->terminal) and check:

$ mount

/dev/sdb2 on /media/PartLinux type ext2 (rw,nosuid,nodev,uhelper=udisks)

It should show your mounted disk, like on mine "PartLinux". That might be a number or just "disk". If not, there is a problem.

Check the permissions:

$ ls -la /media/<yourdisk>
tobias@merkur:~$ ls -la /media/PartLinux/
insgesamt 72
drwxrwxrwx 12 root root 4096 2011-01-06 13:34 .
drwxr-xr-x 5 root root 4096 2011-01-09 10:35 ..
drwx------ 2 tobias tobias 16384 2010-04-28 22:44 lost+found

if the "." directory is not set to drwxrwxrwx then there is a problem.

then check creating a directory
$ mkdir /media/<yourdisk>/testdir

report the output, if it fails, show the output of

$ dmesg as well

Revision history for this message
Ron (ronald17b95) said :
#2

Here's the output for "mount" in the Terminal:

/dev/sda5 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/ranin/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=ranin)
/dev/sdc1 on /media/Archive type ext4 (rw,nosuid,nodev,uhelper=udisks)
/dev/sdc2 on /media/Synchronization type ext4 (rw,nosuid,nodev,uhelper=udisks)

Revision history for this message
Ron (ronald17b95) said :
#3

And the output for "dmesg" is just too long. I tried to post it several times but the Lunchpad doesn't let me. As for the output for the other two commands you asked for I wasn't able to check permissions for some reason. I think I don't have the right command perhaps. Can you give me the command one more time. Just the command and not the possible output. The same is also true with creating a directory. I couldn't get the command right, I think. Apologies.

Revision history for this message
Ron (ronald17b95) said :
#4

You probably have already realized this but in any case let me note that the external hd is partitioned into two sections: sdc1 (58 GB) and sdc2 (239 GB). And you're right. In both partitions I have lost and found folders. But the permission seems to be the problem here as you suggested. I went to "properties" (right clicked both sdc1 or sdc2) and it tells me "the permission could not be determined." This is really strange. I partitioned the disk in the first place. How come I don't have permissions to write to it? How can I change it? And moreover how can I avoid encountering this problem again?

Very gratefully!

Revision history for this message
Ron (ronald17b95) said :
#5

I also get the following error message when I try to "unmount" or "remove" the drive safely:

Error detaching: helper exited with exit code 1: Detaching device /dev/sdc
USB device: /sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1)
SYNCHRONIZE CACHE: OK
STOP UNIT: FAILED: No such file or directory

Revision history for this message
Ron (ronald17b95) said :
#6

OK for those of you who might still be reading this. I found the following thread which is quite useful for my situation but I don't know how to modify the command lines to my particular case:

http://ubuntuforums.org/showthread.php?t=1334840

What is a "mountpoint" exactly? My mount point is /media or /media/<partition 1> or /media/<partition 2> or what exactly? can someone help me with this?

Revision history for this message
Best mycae (mycae) said :
#7

The mount point is the virtual folder that acts as a label for your dive, in your case, according to your mount output, your mountpoints are:

/dev/sdc1 -> /media/Archive
and
/dev/sdc2 -> /media/Synchronization

where the /media/blah is the mountpoint, and the /dev/sdcX is the partition

Revision history for this message
Ron (ronald17b95) said :
#8

Thanks mycae, that solved my question.