change drive permission

Asked by Randy Williams

I have a second SATA hard drive installed and formatted, ext2. The ownership shows as "root" in the drive properties. I want to change permissions on the drive to be able to use it. I tried the console command, sudo chown username:username /path/to/file, but I am not having any success. I don't know what I could have done wrong. I am cautious when it comes to using the command line terminal. The more I use Ubuntu, the more I hate to use Windows.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Olivier (olivier-lacroix) said :
#1

Hi !

please post here the output of the following command

cat /etc/fstab

Revision history for this message
Kemel Zaidan aka Legendario (kemelzaidan) said :
#2

my windows partition is also shown as owned by root, but i can still use it. Are you sure you can't use it. Another thing: I don't know how big your second hard drive is, but it would be better if you format that on ext3 file system. Because of the jornaling feature, the ext3 is a more secure FS.

Revision history for this message
Randy Williams (srw3) said :
#3

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=761f3486-f446-45cb-a866-ac98426332f1 / ext3 defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=575b0247-9fe9-4081-831a-dd99a530130b none swap sw 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec 0 0

I don't see the drive listed in this output. I see sda partition 1 and swap partition 5, but no sdb.

Revision history for this message
Bert Van de Poel (bhack) said :
#4

I used the following commands to fix that:
cd /drive/mount/point
sudo chown -hR root:plugdev ./
sudo chmod -r 775 ./

Revision history for this message
Randy Williams (srw3) said :
#5

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=761f3486-f446-45cb-a866-ac98426332f1 / ext3
defaults,errors=remount-ro 0 1
# /dev/sda5
UUID=575b0247-9fe9-4081-831a-dd99a530130b none swap sw
0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto,exec 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec 0 0

I don't see the drive listed in this output. I see sda partition 1 and
swap partition 5, but no sdb.

On Mon, 2007-12-17 at 12:15 +0000, Olivier wrote:
> Your question #20192 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/20192
>
> Status: Open => Needs information
>
> Olivier requested for more information:
> Hi !
>
> please post here the output of the following command
>
> cat /etc/fstab
>

Revision history for this message
Bert Van de Poel (bhack) said :
#6

have you tried my solution ?

Revision history for this message
Olivier (olivier-lacroix) said :
#7

You need to add your drive to fstab.

enter the following command in a terminal

ls /dev/disk/by-uuid -l

grab the UUID pointing to the partition you want to mount. Then create a folder wher you want the partition to be mounted. FInally enter the following line in the fstab

UUID=<the UUID> <pathToTheFolder> ext3 defaults,errors=remount-ro 0 2

save and close. enter the following command

sudo mount -a

and you're done !

You can now define permissions using chown and chmod

See http://ubuntuforums.org/showthread.php?t=283131 for a deeper view.

Can you help with this problem?

Provide an answer of your own, or ask Randy Williams for more information if necessary.

To post a message you must log in.