TetraQuicky03: Resetting permissions in quarantine
Tags: linux, bash, ubuntu
Published: 2020-03-23 11:48:50

Maybe my Linux system got offended by all the other bad things I've said about Linux photography tools in my previous [post](https://dev.to/tetractius/tetraquicky02-default-boot-os-or-kernel-in-grub2-24hc)... but suddenly my home drive wouldn't allow me to write in my home directory... like this without any sort of explanation.

And off course the usual drill: 
- get upset because you cannot find a USB-stick in your home for the recovery drive. And it is a quarantine time. Not that you can go around to buy a new one to be added to the other 37 that are hidden in your home. Yes because every time you need to use a [RescueCD](http://www.system-rescue-cd.org/) recovery disk or install another Linux distro somewhere, you look for a USB stick in your home and you end up in buy a new one (or order 25 of them on Amazon just to make sure this time is not wasted again). But not hope there... you will lose them all.
- Ok: you find a crappy 2.0 one... of only 8GB... that will do.
- you do a boot in it and you look for your ext4 hated ubuntu partition - this is while you put yourself at ease because all your important git repos are mirrored in your company bitbucket server (of course right?) and you other stuff important are on Dropbox (and you swear for all the money you are giving to them only because they are the only one to give decent support for Linux)
- and the onto the usual fix. Wait, what is the partition?
what is the partition to fix:
```bash
$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL,UUID | grep ext4
├─nvme0n1p6 ext4       453G /                                        26ee30c6-82a4-437d-9d85-da7a9a413e20

```
(more about the beauty of the `lsblk` in another TechQuicky)

cool: `nvme0n1p6` is what you were looking for
```bash
sudo fsck -y -f /dev/nvme0n1p6
```

and then you get some jibber-jabber... but no error... what?

let me restart then... but no again... no $HOME write permission says Plasma (because, for how much you might hate KDE, you will never get a meaningful error from Gnome... so better keep a minimal plasma installation on aside)

but let me check stuff with `root` access. Wait, is working. WTF!!!

ok let me re put all my home directory as owner:
```bash
sudo chown -Rv tetractius:tetractus /home/tetractius
```

It take ages... and after that:

```bash
cd ~
touch wtf
touch: cannot touch 'wtf': Permission denied
```

whaaaaaaaat???

wait
```bash
cd ~
sudo mkdir wtf
chown tetractius:tetractius wtf
cd wtf
touch wth
```

no errors. Ok that is madness...

you know what?

```bash
cd /home
ll tetractius
drwxr--r-- 188 tetractius tetractius 20480 Mar 23 11:08 tetractius/
```

permission looks right...
so get this bastard!!!
```bash
chmod 777 tetractius
```

...and finally I got my rights back... I can _touch_ whatever I want.

but just for curiosity...
```bash
chmod 744 tetractius
```
... and it's still working... WTF!!!

I reboot... everything works fine. Even Gnome on Xorg is back to normal (because if you still have hope in the Open Source community to fix all the apps for `Wayland` you can probably die in very old age already... let alone the support for WebRTC than in time of COVID-19 is essential).

Do you have any idea of why you might have to reset permissions on a directory that had perfectly working partition?... If so please let me know...

it was probably the dual booting karma.