Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have two my hard disk divided into two partition (apart from swap). First one is /dev/sda3 on which I have my ubuntu installation. Second one is /dev/sda1. Now, when I try to copy a file to /dev/sda1, I need to do a sudo, because my user does not have permission.

How do I give read, write permission to my user? I know chmod 777 is a bad idea. How about chown or chgrp?

by the way, /dev/sda1 is mounted as /media/hood, so what should be the syntax my command?

I have two my hard disk divided into two partition (apart from swap). First one is /dev/sda3 on which I have my ubuntu installation. Second one is /dev/sda1. Now, when I try to copy a file to /dev/sda1, I need to do a sudo, because my user does not have permission.

How do I give read, write permission to my user? I know chmod 777 is a bad idea. How about chown or chgrp?

The output of mount command is as as follows:

/dev/sda3 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devp
ts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
gvfs-fuse-daemon on /home/chirag/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=chirag)

/dev/sda1 on /media/hood type ext4 (rw,nosuid,nodev,uhelper=udisks)

share|improve this question
1  
You should not be copying to the raw partition/device /dev/sd*... –  izx Aug 15 '12 at 18:44

1 Answer 1

up vote 2 down vote accepted

Changing the ownership allowed me to copy without doing sudo. command used:

sudo chown chirag:chirag /media/hood/ -R

Where, chirag:chirag is user:group.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.