Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hello I have a HDD disk connected with a USB converter to my computer. It consists of two partitions, the first one is mounted automatically and I can grab all the files from it, but the second one I have to mount manually as a root in the command line, if I try to open it with nautilus it gives an error.

The drive where the problem is is drive sdb1, sdb2 has the same settings but works fine. I am using Debian Wheezy.

This is the fstab:

/dev/sdb1       /media/usb0     auto defaults,uid=1000,umask=0777 0 0
/dev/sdb2       /media/usb1     auto defaults,gid=disk,umask=0777 0 0

And when I try to copy the files with this command (as root) cp -vr /media/usb0/* /home/user/Videos/ I get these types of errors:

cp: reading `/media/usb0/.lang/file.ext': Permission denied
cp: failed to extend `/home/user/Videos/.lang/file.ext': Permission denied

How can I at least copy the files to my main HDD? I don't need to adjust them I only need to copy them!


I got it mounted using my sudo, and the I can use the root folder, but I can't access one particular folder. Even when I use chmod -Rv 777 /home/user/external/.folder

share|improve this question
Have you tried 'sudo nautilus'? – Snesticle Nov 1 '12 at 18:58
up vote 1 down vote accepted

You can take ownership of the whole /media/usb0/ directory: sudo chown -R $USER:$USER /media/mnt

If you are using a desktop environment, it's automount daemon should take care of mounting the volume with correct permissions. Just make sure to remove /media/usbX lines from /etc/fstab

If the volume is NTFS, make sure you have ntfs-3g installed.

share|improve this answer

If I'm not concerned about security the following works nicely and quickly..

  # chmod -R 777 /mnt/yourdrive/*

You can also approach this in a more granular fashion and give a standard user ownership over select files..

  # chown standarduser /mnt/yourdrive/the/path/is/a/long/one
share|improve this answer

It looks like the filesystem is mounted read only, because otherwise you would be able to do whatever you want as root.

You did not mention which filesystem you have on sdb1. If it is ntfs, then the standard driver will not allow you to write. The good news is you can use ntfs-3g to mount your drive. There is most certainly a FUSE package for your distro that you will need to install. As for the fstab, something like this will suffice (from my own fstab):

/dev/sda3   /mnt/media   ntfs-3g    uid=1512,umask=0022   0 0

The uid parameter must match the id of your default user, which can be found with the id command. That is, if you wish all files to be owned by that user.

share|improve this answer
This did not work, I still get the failed permissions when I try opening the files. I also tried it in combination with the other two answers but to no avail. – tversteeg Nov 3 '12 at 15:46
You know that the umask in your question disables read access, right? – Ярослав Рахматуллин Nov 4 '12 at 23:38
Well I removed the umask and it still doesn't works. – tversteeg Nov 6 '12 at 23:12
Can you verify that the file-system is mounted in read-write mode? run mount as root, find your usb-mount point-device combo and look for (rw,...). If it has (ro,...) then the system is correct in not letting you write to that usb. Also, refrain from saying "It doesn't work" because at least in this case, I know for a fact that "It does work". Try to clarify what doesn't work, or which step you can't seem to figure out. Hearing "It doesn't work" is really discouraging and makes the asker seem clueless (please don't take that personally) and uninterested in the solution . – Ярослав Рахматуллин Nov 6 '12 at 23:45
you should have alike looking like this: /dev/sda1 on /mnt/win type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096,default_permissions) – Ярослав Рахматуллин Nov 6 '12 at 23:48

Have you tried mounting the disk on your /home? if not do it like this:

$sudo mkdir /home/user/external
$sudo mount /dev/sdb1 /home/user/external

Then you (i.e. user) should be able to read and write to the disk (i.e. /home/user/external)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .