Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have linuxmint installed on a 24GB SSD on my laptop. The laptop also has a 1TB HDD installed internally. I need help getting permission to write to the HDD, and use it as the main drive for file storage. Currently the drive is viewed as a "removable drive" and when I try to view the permissions it says "The permissions of "HDD" could not be determined". The drive is mounted and everything but I still can't save anything on it or create any files or directories. I am running Mint 13 on a lenovo laptop. If needed I can post results of fdisk -l. The drive is formatted in ext3 with 1 partition taking up the entire drive. Thanks in advance for the help!

share|improve this question
2  
How is it that the drive is mounted but you can't write to it ? Do you have it mounted read-only, is the mount of the drive owned by root and you don't have permissions to write to it ? Conceptually it should be quite straightforward to mount the drive - mounting an external drive is no different to mouning an internal one. –  davidgo Sep 29 '13 at 6:18
    
I just tried to unmount and it gave me the error "Only root may unmount drive /dev/sdb". I followed a tutorial to format the drive and in the process it instructed me to create a "media" drive and mount the drive to that. I'm not assuming that is incorrect, and if so how should I proceed to unmount the drive and then mount it again? –  user1371489 Sep 29 '13 at 7:19
1  
Sounds like a permissions issue - you are obviously not root, and I'm surmising that the permissions on the drive are such that only root can access it. If you are not overly fussed about security, you can make yourself the owner of the drive as follows: 1. Get root access (this will vary from distro to distro, but in a terminal typing "sudo su" or "sudo /bin/bash" often works. Then change the ownership of the mount point and all sub-paths in the drive to you - so if the mount point is /media/MYDISK1 you would use the command chown -R yourusername /media/MYDISK1 –  davidgo Sep 29 '13 at 7:41
add comment

1 Answer

EDIT: davidgo made me notice that OP already stated the HDD is in ext3 format. Silly me. Still: have you checked the permissions on the directory which you use as mount point?

It is possible that your HDD is formatted in one of two formats which cause problems in Linux/Unix, i.e. FAT and ntfs. Should your disk be formatted in ntfs, you will need to install the ntfs-3g package, which will allow you to use permissions on the disk, without any problem. The package will allow you to use linux-compatible names even though they are not compatible with windows, and you will have all kinds of links (sym- and hard-). The usual command to mount a ntfs file system in linux is:

sudo mount -t ntfs -o rw,auto,user,fmask=0022,dmask=0000 /dev/sdX /path/to/mount/point

This provides standard permissions (755 for files, 7777 for directories).

If the filesystem is instead FAT, the situation is less easy. The reason is that FAT is not POSIX-compliant, and does not provide standard Unix file permissions. This means that you can set file permissions only once, when you mount the disk via the command

mount -t vfat -o umask=000 /dev/sdX /path/to/mount/point

and these permissions are applied to the whole disk; from then on the permisisons of individual files and directories are immutable. Lastly, you must remember that you must set permissions on the directory on which you will mount the FAT system in accordance with Linux rules, while the disk is not mounted.

share|improve this answer
    
OP stated drive is formatted with EXT3... –  davidgo Sep 29 '13 at 7:38
    
right! Silly me... much work for nothing.. –  MariusMatutiae Sep 29 '13 at 8:28
add comment

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.