I have a 3TB external hard drive that I plan to use for backups. I originally tried formatting with cfdisk, until I learned that only GPT supports 2TB+ partitions.

So I converted the drive to GPT and formatted the one partition I made to ext4, but I keep getting "Permission Denied" errors. Normally, udiskie is able to automount everything such that I don't see write errors such as this.

I feel like my lack of knowledge about GPT might be contributing to some oversight, but I'm not sure what might be wrong.

  • 3
    make chmod 777 on root directory of that disk. – Eddy_Em Apr 20 '13 at 20:39
  • What are the mount options for this partition in /etc/fstab? It may be mounted with thero (read-only) option. – Joseph R. Apr 20 '13 at 20:54
  • If you have access to something running a GUI, just use GParted. It's basically a GUI frontend to every Linux partitioning tool. It does all the dirty work, all you do is point and click. It also queues your commands up, and applies them all at once, so if you accidentally mis-clicked something, your disk doesn't get screwed up. (that is, unless you decide to click "continue" anyway...) – JamesTheAwesomeDude Apr 20 '13 at 21:26
  • 1
    Post the complete transcript of a command that causes a “permission denied” error. Also post the relevant file and directory permissions (ld -ld /path/to/dir /path/to/dir/file), mount options, and whatever else seems relevant. We can't help with such a vague description of the problem. – Gilles Apr 20 '13 at 23:53
  • @Eddy_Em Using chmod 777 made it work, I feel dumb for not thinking of that. I guess it makes sense, though, since I formatted it with root and all. Post it as an answer so I can accept it! – mellowmaroon Apr 21 '13 at 3:03

When you format disk partition with native filesystem, the permissions to directory you mount it will be the same as permissions to root directory of that partition. Permissions to mount directory itself usually have no sense.

Some filesystems have mount flags allowing to change permissions (that's usefull for example for USB sticks).

Mounting of non-native filesystems (vfat, ntfs) works by different way: you can give options to mount to set owner of files on mounted volume & permissions to that files.

I recommend you to read man mount for clearance.

In common case, when you have a native filesystem on a removable device, you should to make similar UID's and GID's at least for yourself on all computers where this device will be mounting. Otherwice you should make from root chmod -R a+rwX /mountpoint/of/device after mounting it and in future not to make files and directories with permissions other than 666 and 777 respectively.

  • I still get permission denied, after chmod -R a+rwX – IgorGanapolsky Jan 30 '17 at 18:24
  • @IgorGanapolsky, did the permissions changed? What ls -l said? – Eddy_Em Jan 31 '17 at 7:42
  • It looks like my external SSD drive needed to be mounted first. Now I can access it just fine. Thanks. – IgorGanapolsky Jan 31 '17 at 13:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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