LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   External disk (ext4) returns an error when tried to mounted with user permissions (https://www.linuxquestions.org/questions/linux-newbie-8/external-disk-ext4-returns-an-error-when-tried-to-mounted-with-user-permissions-4175625141/)

netpumber 03-07-2018 01:30 PM

External disk (ext4) returns an error when tried to mounted with user permissions
 
Hello.

I have an external disk formatted with ext4 and when I tried to mount it using the following command

Code:

sudo mount -t ext4 -o umask=0077,gid=1000,uid=1000 /dev/sdb1 /mnt
I'm getting this error:

Quote:

mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.
while if I try the simple

Code:

sudo mount /dev/sdb1 /mnt
the disk is mounted properly.

Why is this happening?

MensaWater 03-07-2018 01:52 PM

Because umask, gid, etc... are NOT mount options for ext4 filesystems. They ARE mount options for fat filesystems and MAY be for others.

If you run "man mount" and search for ext4 you'll see the options applicable to ext4. (Oddly enough just above the options applicable to fat.) Not all options apply to all filesystems. You specified type as ext4 but then used fat options.

What type of filesystem is it when you do the simple mount? (Look in /etc/mtab.)

netpumber 03-08-2018 02:59 AM

Yeap. It's ext4.

Thank you very much.

MensaWater 03-08-2018 08:24 AM

Glad I could help. If you don't mind, please go to thread tools and mark this as Solved. It helps future web searchers more quickly find solutions.


All times are GMT -5. The time now is 08:29 AM.