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'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?

share|improve this question
add comment

2 Answers 2

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:
http://ubuntuforums.org/showthread.php?t=1482818

share|improve this answer
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. –  FEichinger Feb 7 '13 at 13:52
    
@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. :) –  FEichinger Feb 7 '13 at 14:09
    
thanx, that did help –  Sameh Hany Feb 7 '13 at 15:30
add comment

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.

share|improve this answer
    
recursive 777 chmod is definitlely a very bad idea –  Kiwy Mar 25 at 10:33
    
@Kiwy, updated. expecting +1 –  Prinz Jun 27 at 6:28
    
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 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 at 6:24
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.