Hopefully an easy question, but I'm having trouble finding any similar questions.
In my Ubuntu system I have an external hard drive. When I make a file in this external drive, I noticed I can't then open the file. After some digging I noticed this was because the directories created in the hard drive are created with permission 664, which is not very useful for directories. (Files are created with 664 also, which to me makes no sense). I've checked and in the main file system (not within the external drive) the creation of files follows the umask value of 0022 like it should. Directories come into creation as 755, and files as 644.
My question is: why is my external hard drive ignoring my umask? I'm making the files locally, there's nothing fancy going on here, so why would my default permissions in an external drive differ from my system and where can I change that?
I can manually change the permissions to what they need to be, but that is very tedious. Let me know if more information is needed, I don't really know what needs to be known.
EDITS: Replicating the error: Inside Computer itself, umask works correctly.
tnevins@mixing:Music$ umask
0022
tnevins@mixing:Music$ mkdir mydir
tnevins@mixing:Music$ touch myfile
tnevins@mixing:Music$ ls -l
total 4
drwxr-xr-x 2 tnevins mixinglab 4096 May 10 11:23 mydir
-rw-r--r-- 1 tnevins mixinglab 0 May 10 11:23 myfile
Inside the drive /tank/planktonPool it does not.
tnevins@mixing:planktonPool$ umask
0022
tnevins@mixing:planktonPool$ mkdir mydir
tnevins@mixing:planktonPool$ touch myfile
tnevins@mixing:planktonPool$ ls -l
drw-rw-r--+ 2 tnevins mixinglab 4096 May 10 11:27 mydir
-rw-rw-r-- 1 tnevins mixinglab 0 May 10 11:27 myfile
/etc/fstab
UUID=f1a76953-ece5-4559-8436-54bdd86d7fee /media/tank ext4 nofail,defaults 0 2
sudo lsblk -f
NAME FSTYPE LABEL UUID MOUNTPOINT
sda
└─sda1 ext4 a1e54134-bc37-4f85-9f61-65311b75c573 /
sdb
└─sdb1 ext4 mixingBackup 9ccbbee0-167e-4b19-bcf8-b2648a7dd40c /media/mixingBac
sdc
└─sdc1 ntfs vault 220EA82D219FBF1D /media/vault
sdd
└─sdd1 ext4 tank f1a76953-ece5-4559-8436-54bdd86d7fee /media/tank
Ah, so based on this command it looks like the "tank" drive is the sdd1 drive. It is the one I'm currently asking about.
sudo lsblk -m
NAME SIZE OWNER GROUP MODE
sda 1.8T root disk brw-rw----
└─sda1 1.8T root disk brw-rw----
sdb 931.5G root disk brw-rw----
└─sdb1 931.5G root disk brw-rw----
sdc 10.9T root disk brw-rw----
└─sdc1 10.9T root disk brw-rw----
sdd 8.2T root disk brw-rw----
└─sdd1 8.2T root disk brw-rw----
sudo parted -ls
Model: ATA WDC WD2003FZEX-0 (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 2000GB 2000GB primary ext4 boot
Model: Seagate Backup+ BK (scsi)
Disk /dev/sdb: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 1000GB 1000GB primary ext4
Model: TT H/W R AID5 (scsi)
Disk /dev/sdc: 12.0TB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 1049kB 12.0TB 12.0TB ntfs msftdata
Model: HzW RAID 5 (scsi)
Disk /dev/sdd: 9002GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
1 17.4kB 9002GB 9002GB ext4 msftdata
df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 32931096 0 32931096 0% /dev
tmpfs 6591648 3428 6588220 1% /run
/dev/sda1 1921802432 213108624 1611001752 12% /
tmpfs 32958224 46184 32912040 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 32958224 0 32958224 0% /sys/fs/cgroup
/dev/sdc1 11720883180 10724315468 996567712 92% /media/vault
/dev/sdd1 8721245008 8136336948 145359752 99% /media/tank
/dev/sdb1 961302556 961286176 0 100% /media/mixingBackup
tmpfs 6591644 20 6591624 1% /run/user/127
128.151.161.22:/media/cage 11627446496 8377352688 2664031680 76% /media/cage
tmpfs 6591644 0 6591644 0% /run/user/1001
tmpfs 6591644 10144 6581500 1% /run/user/1003
tmpfs 6591644 0 6591644 0% /run/user/1004
ls -ld /media/tank/
drwxrwxrwx 25 dhk mixinglab 4096 May 10 11:26 /media/tank/
ls -ld /media/tank/planktonPool/ (The folder I'm usually working in)
drwxrwxr-x+ 76 tnevins mixinglab 4096 May 10 11:27 /media/tank/planktonPool/