How to mount ext4 partition?
Solution 1
You don't. The files in the fs are owned by whoever owns them, and you can not change that at mount time. Instead you need to change the permissions to give yourself access with sudo chown yourname.yourname /path/to/mount
. On a freshly formatted filesystem, the root directory is owned by root, so you will need to change it and from then on, you will be able to create new files which will be owned by you.
Solution 2
Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.
gksudo nautilus /etc/fstab
To mount the partition as "data" for example with read-write permissions add this entry in the /etc/fstab:
/dev/sd8 /data ext4 defaults 1 2
Once the partition is mounted as "data", make yourself (my user account) the owner
sudo chown flint:root /mnt/data
and give yourself permission so you can access the partition
sudo chmod 700 /mnt/data
Related videos on Youtube
Flint
Updated on September 18, 2022Comments
-
Flint over 1 year
How do I mount an ext4 partition as my user account so I wouldn't require root access to r/w on it? I used
-o uid=flint,gid=flint
on themount
command but I keep gettingmount: wrong fs type, bad option, bad superblock on /dev/sda7, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
Another thing, I want avoid using
udisks
for now as it doesn't let me mount to my specified mount point name.-
Tim almost 12 yearsCan u paste your
df -h
output? -
nanofarad almost 12 yearsWhat specific command did you use? Please include all arguments, and whether you are using live installation.
-
atenz almost 12 yearsAlso check the smart status of the drive /partition from Disks , if found something unusual post the output of
sudo smartctl -HA /dev/sda7
-
atenz almost 12 yearssee if this helps superuser.com/a/348442/136930
-
atenz almost 12 yearsI just realized
mount an ext4 partition as my user account
, so does it mount NORMALLY , or by selecting that partition from nautilus file manager. Is it another user's encrypted partition.
-
-
psusi almost 12 yearsYou missed the key part of the question: "as my user account"
-
Mitch almost 12 years@psusi this can be done as his user account. He requires root to edit the file. right?
-
psusi almost 12 yearsHe is asking how to mount the fs in such a way that the files inside it are owned by his account instead of root.