I've set the /etc/fstab file so that I can mount an ext4 partition on startup and I did it with the following options : rw, auto, nouser, exec, sync.

The problem is that I can't create or delete any file on that partition without using sudo, which I find even more puzzling because I've mounted an ntfs partition (with these options : rw, auto, user, noexec, sync) and I didn't get the same problem I can read and write on the ntfs partition without using sudo.

How could I mount an ext4 partition and have read/write permissions on it?


First of, it'd be useful to check the drive's UUID by using following command:

ls -l /dev/disk/by-uuid

In my experience, I usually mount an EXT4 formatted harddrive using the defaults, and I never experienced any errors in write permissions.

My /etc/fstab looks like the following:

UUID=004f9bfa-fb5a-438c-8a5a-dc04fa6f2d3e /media/MYCH0  auto defaults 0 0 #external hdd

if all fails, you also might try to set yourself as the owner by doing this:

sudo chown username:username /media/mountpoint

For further reference, you might want to take a look at this:

  • 1
    Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. – user98085 Feb 7 '13 at 13:52
  • 1
    @FEichinger Thanks for the heads up, I've edited my post. – m.devrees Feb 7 '13 at 14:08
  • Wonderful. Please do include the source link, though, as it may have further information. In fact, try to always include the material you used to come to the answer. :) – user98085 Feb 7 '13 at 14:09
  • thanx, that did help – Sameh Hany Feb 7 '13 at 15:30

This may not because of mounting problem, but of permission. You may not have sufficient permission to write on drive/folders on it or you are not the owner.
As you not provided the mount point we assume partition mounted at /media/foo
To own a directory, Open a terminal and run sudo mkdir /media/foo/test; sudo chown $USER /media/foo/test . Now you should be able to write inside the folder test.
If you want to write on the folder then there are two option.
1. own the data by sudo chown $USER /media/foo.
2. Allow write for other users sudo chmod o w /media/foo
Rarely some people interested in write, read access to all content for all users, like a windows partiton in linux. Commands chmod and chown has an option -R which recursively change the mode of all data under it. But it is not recommended unless you know what you do. If you use the -R on a OS's partition it may become unfunctional.

  • 5
    recursive 777 chmod is definitlely a very bad idea – Kiwy Mar 25 '14 at 10:33
  • @Kiwy, updated. expecting +1 – Prinz Jun 27 '14 at 6:28
  • 2
    as far as I can tell what you say is very inacurate, and a very important warning on chmod 777 -R is still missing. I guess that you do not use windows that often, because it does handle groups and user access on file system since windows 2000 NT – Kiwy Jun 27 '14 at 7:15
  • @Kiwy. Updated. I mean windows partition on linux. Does a windows partiton have write access to all linux users ? – Prinz Jun 28 '14 at 6:24
  • what if i want the hard drive to be able to be used by anyone who plugs it into their computer and not have to deal with permissions each and every time? – askcompu Jul 13 '16 at 6:45

Unfortunately Linux kernel enforces POSIX permission on ext2/ext3/ext4 FS.

With common group across hosts and setgid bit or ACL you may share external volume across different hosts and keep read/write permission. One example of such setup is:

$ sudo chgrp -R sys /mnt/data/dir
$ sudo chgmod -R g+s /mnt/data/dir
$ sudo fsetacl -R -m g:sys:rwx /mnt/data/dir
$ sudo fsetacl -R -d -m g:sys:rwx /mnt/data/dir
$ sudo adduser user sys

Read more at https://unix.stackexchange.com/questions/126213/external-hard-drive-permissions-ext4/

See also Solving permission problems when using external EXT4 hard disk with multiple linux installs

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.