Skip Navigation

User banner
Posts
12
Comments
465
Joined
2 yr. ago

  • I accidentally scrambled all the permissions on my home directory by running sudo chmod -R -755 .

    The -R does this recursively through out every sub directory under /home/user/

    While this looks somewhat innocent and harmless, most (if not all) files on home directory are owned by normal user. The above command just changed all files ownership to root (privileged user) which has alot of nuisance.

    Effects:

    1. To run any app now, you need to open a new terminal and type sudo -E app-name &, every single time. Annoying, but not as much as the following effects...
    2. Running apps this way is not recommended since the app might accidentally change your system configurations without remorse, as it's launched with root privileges (eg. network sockets, of which might most certainly be used by another app or daemon) and lead into hundreds of popups telling you that some system app terminated unexpectedly (without any reason whatsoever! Now you have to hunt that reason out on dmesg or sm'n). This can and WILL certainly lead to Linux crashes.
    3. Due to effects on 2. Above, most apps (eg. Android studio) WILL prevent you from launching it with root privileges, by quiting itself immediately when it detects that privileged user is owner of the application process. So you will wind up with apps that you might never use again 😕

    It's a world pain by a thousand tinny cuts.

    Hope this answers all your questions, and yes, it's -R, not -r

    Solutions:

    1. Be extra extra careful while running sudo commands, especially those with -R (recursive) options. Are you on a right directory? ( I thought I was, turns out I wasn't)

      in addition to above, I would try to avoid using ., and specify the particular directory using ~/path/to/dir. So, instead of sudo chmod -R -755 ., I could have used sudo chmod -R -755 ~/path/to/dir

    2. timeshift to the rescue. Backup your home directory (except Downloads and Video folders), preferably weekly, (or daily if you change your system configurations more frequently)
  • It's called 21st century marketing bruv

  • While you "can" strip computer systems off a car... It is not recommended, for you never know the underlying impact (interms of interconnectedness) what you are removing has to the crucial driving routines..

    I mean, you might unplug the heating of your car seat, and turns out the car thinks you have no seat... That sorta thing...

    Edit: Unless the hacks are made public (of which are barely available, since they are a part of companys' trade secrets, someone's butt will get a proper suing for this) Just avoid them completely if you can.

  • Dude... I literally just got out of local school looking for funding for a computer lab.

    Any suggestions for finding these laptops will be highly appreciated

  • Wowthieth

  • 😂 heck no! (Just found out)

    Nix provides a platform where you define how the system should be by specifying what version of apps to install, and configurations to inherit.

    It does not back up any configuration and files that are outside the defined configuration file! And Turns out there are plenty of them.

    What, You changed into dark theme on your android studio? Stored on home dir .local, not on nix configuration file

    Every app that I customized it whilst inside the app, the changes are thrown on .local.

    Again... TIMESHIFT would have saved me sooo much time.

    This is me Sangry now

    Edit: I hope this post saves someone a world of pain in the future

  • Well I nuked myself with chmod -R on my home directory this morning... My day is now dedicated to reinstalling nixos on my laptop... Glad I didn't do this on a production server...

    Will be extra cautious now with the -R commands

    PS: I now see the need of timeshift despite of using nixos... I could have backed up my home dir... And restore the prev state

  • Or... Hear me out...

    Use the default built-in alarm.

    Why? Most of the non-built are somewhat blocked by phone notification controls such as do-not-disturb and other similar modes. Getting an app that has its implementation of this just right can be frustrating...

    Just put a bunch of 30 min interval alarm, with a slight different ringtone than your usual alarms and you'll be golden :)

  • We mix your blood with glowing ingredients, and compare the illuminated patterns that we see when we shine light on it with those of your family members

    Wow, learned something today

  • I will often complain when my metal box picks the wrong music to play.

    Or when the manufacturers decide to remove the squishy buttons for poking the metal box