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

I have a user that I log in with over SFTP to my Ubuntu box. They have permission to write to the home directory of course. The external hard drive gets mounted to /media folder but I can't write to it over SFTP while logged in with that user. How would I set the permissions to allow me to write to the drive?

share|improve this question
up vote 1 down vote accepted

Unmount the drive from it's default mount point in /media.

Manually create a folder and give it suitable permissions (let's say 700).

Manually mount the drive to that folder.

Example, if the drive is formated ext4 and is installed on your system as /dev/sdb1:

mkdir ~/rwdrive
chmod 700 ~/rwdrive
mount -t ext4 /dev/sdb1 ~/rwdrive

Obviously you would specify the actual file system type by substituting it with ext4, and the actual device by substituting it with /dev/sdb1

You should now be able to write to the drive.

If you always have the drive plugged in, you might like to add the mount to /etc/fstab.

share|improve this answer

You must log in to answer this question.

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