1

On a new external hard drive (Intenso 05-1204-18A), I made (with GParted) two partitions :

Disk /dev/sdc: 931.5 GiB, 1000204883968 bytes, 1953525164 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xfa00a60d

Device     Boot    Start        End    Sectors   Size Id Type
/dev/sdc1           2048   50794495   50792448  24.2G  b W95 FAT32
/dev/sdc2       50794496 1953523711 1902729216 907.3G 83 Linux

(I am using Linux 3.19.3-3-ARCH GNU/Linux)

When I mount the first (by using file manager, but it works with terminal too), I can see :

drwxr-x---+ 3 felicien felicien    60 Apr 16 16:31 .
drwxr-xr-x  3 root     root        60 Apr 16 15:58 ..
drwxr-xr-x  4 felicien felicien 16384 Jan  1  1970 INTENSO WIN

I can mkdir and everything in this directory. When I mount the second :

drwxr-x---+ 4 felicien felicien    80 Apr 16 16:32 .
drwxr-xr-x  3 root     root        60 Apr 16 15:58 ..
drwxr-xr-x  4 felicien felicien 16384 Jan  1  1970 INTENSO WIN
drwxr-xr-x  3 root     root      4096 Apr 16 16:02 Intenso Linux

I have to chown the directory to be able to write into it. Why have I permissions with FAT32 and not EXT4 ?

Thanks.

1

The fat32 filesystem has no notion of ownership or permissions. The man page for mount lists these options that help make it look closer to what Unix users expect:

uid=value and gid=value
      Set the owner and group of all files.  (Default: the uid and gid
      of the current process.)

umask=value
      Set the umask (the bitmask  of  the  permissions  that  are  not
      present).  The default is the umask of the current process.

So when you mounted it, it was mounted with your userid, groupid, and umask (which I'm guessing is 022). All files and directories will be owned by you, and will have permissions rwxr-xr-x.

ext4, on the other hand, is a classic Unix filesystem that stores userid, groupid, and permissions information. If you create a directory while running as root, it will be owned by root, until you use chown to change it. You can change the group or other permissions, using chmod, to make an object be writable by multiple users.

  • Thank you ! I have chmod 777 the directory, there is an ugly green color on my terminal but I can write into it :) – Félicien Apr 16 '15 at 17:04

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.