I tried to increase swap space to run some code.
The commands I followed:
size="16G"file_swap=/swapfile\_$size.imgsudo touch $file_swapsudo fallocate -l $size /$file_swapsudo mkswap /$file_swap$ sudo swapon -p 20 /$file_swap
which threw me the error swapon: /swapfile_16G.img: insecure permissions 0644, 0600 suggested.
alright, change the permission:$ sudo chmod 0600 /$file_swap
and after this every program closed. One after the other. Even the terminal I was using. When I tried opening any program again, i got a popup stating permission denied
Fear not I thought, rebooted and went to recovery mode as root, and changed the chmod of /swapfile_16G.img to 0777 (I just remembered that it was 0644 before I think), hoping that would fix it. Rebooted.
was greeted with [FAILED] Failed to start System Logging Service
at boot.
I tried replicating it in a vm on Windows, but failed to recreate it on a fresh installation of Ubuntu.
Does anyone have a hint what could've happened? I'm not afraid to lose my files on this partition, as I wasn't really working on anything but my code there - which is up to date on github.