Permission to /dev/sdb

I have already backed up an image of /dev/sda to second HD (sdb) but now when i try to display contents of HD the err msg says that i do not have permission (apparently since i am not the owner for some unknown reason). How do i take control of the second HD ? Thanx.

Bewildered Bob

First it depends of what filesystem you use on the partitions of sdb. Given that it's an image of sdb, I'll assume that it uses EXT4 but things will be different if it's FAT/NTFS.

On a Linux distro, you only own your home folder. Any directory/partition outside of it belongs to root unless it's setup for a different user.

To gain access to the partitions on sdb (sdb1 and so on), you have two possibilities:

  1. Simplest one: change the owner of the directory used as mount point for the partition once it's mounted.
  2. Other possibility, slightly more complex: change the mount options for the partition to set a specific user as the owner.

If you have several users on your PC and they all need to have access to the partition, things will become a bit more complicated.

To begin, how do you mount your partition(s) on sdb? Automount from Caja ? You created a mount point and added it in your fstab? (EDIT: if the latter, please post the content of your fstab.)

1 Like