I’m a technical kinda guy, doing technical kinda stuff.

  • 0 Posts
  • 23 Comments
Joined 9 months ago
cake
Cake day: September 27th, 2023

help-circle
  • The bug is the lack of documentation and that a simple unguarded command can erase all user’s data on the system.

    Also, the principle of least surprise would like a word.

    If I look at the command line arguments of a program called “systemd-tmpfiles” and one of them is called “purge” I will generally assume that option will purge temporary files.

    Now it turns out that someone decided that this program would be a simple way to do something with /home directories(*) so they included /home in the config file for the program, the file that the program reads by default when it is invoked.

    Who decided it would be a good idea for it to deal with /home?

    Wellllll…

    https://github.com/systemd/systemd/blob/main/tmpfiles.d/home.conf

    (*)I have no idea what this program is doing with /home in its config file. I will presume that there is a useful and mostly logical reason for it, and that this command line option was just an unfortunate footgun for those users who were not intimately familiar with systemd.


  • I hate how bloated the kernel is. I’d like it to fit into main memory.

    Take a copy of lspci, lsusb. Use them to build a kernel from source with only the bits you need and then make the bits you might need modules. Include your filesystem driver into the kernel and you can skip the usual initramfs stage and jump straight to your root filesystem.

    Might take a few tries, but at least it doesn’t take 18 hours to compile the kernel anymore…


  • Turns out it seems the Australians have public health insurance for everyone - Medicare.

    To follow from your comment , because Australia has a publicly funded health system, the government actively works to reduce preventable diseases because it reduces the load on the system.

    So they have had:

    A sunscreen campaign and skin cancer check initiatives since the '80s.

    Anti-smoking campaigns (and high tobacco taxes) where resources are available to help quit.

    Every citizen gets a free bowel cancer test mailed to them when they turn 50 to help find and treat cancer earlier.

    Road safety laws are tight and helmet / seatbelt regulations are strict as it reduces hospital loads.

    Vaccinations for a multitude of easily preventable diseases are given for free in childhood, particularly now for the virus that causes cervical cancer.

    Those and a myriad of other public health initiatives all help Australians to live longer.

    Coupled with the fact that the cost for the whole population is borne by an income tax of approximately 2% , it means that if you are poor or unemployed, you still have access to health services. That also means that small health issues among low income earners don’t snowball until they are life threatening.

    It has the knock on effect that people don’t end up trapped in a job because it offers “good benefits and a low deductible” and concerns about pre existing conditions interfering with insurance and etc when changing jobs is generally moot.

    Then throw in mandatory government regulated retirement funds that require all employers to put in 12+ percent of an employee’s gross earnings into an employee’s fund of their choosing for their retirement. That coupled with public health generally means the whole US style worker=slave arrangement can’t exist.

    Which means the US will get nothing like this as all that screams of nanny state overlords and death panels and moar taxes killing freedom and so on and so forth. Sorry guys.


  • Yes, I shifted to my own domain after my default ISP of 20 years decided that email was just too hard, you know? They didn’t outright say it, they just started batch processing emails so that I’d get all my daily emails at around 2 am the next day. Super handy for time limited password reset emails!

    A few hours reading a guide and setting up a $5/mo linode email server with SPF and dmarc, a few more hours transferring 20 years of IMAP mail from my old account to a folder, and a month or so of changing a few site contact emails over each day when they emailed something to my old account, and now I’ve got an email server on my own domain that is 10 times faster at sending/receiving mail than my old ISP ever was.

    And now I can have amazon@mydomain.com and career@mydomain.com and random other disposable addresses so that when they are inevitably sold off for the $$$ I can just dump them and maintain a spam free inbox.


  • You’re thinking of a firewall. NAT is just the thing that makes a connection appear to come from…

    That connection only “appears to come from” if I explicitly put a rule in my NAT table directing it to my computer behind the router doing the NAT-ing.

    Otherwise all connections through NAT are started from internal->external network requests and the state table in NAT keeps track of which internal IP is talking to which external IP and directs traffic as necessary.

    So OP is correct, it does apply a measure of security. Port scanning someone behind NAT isn’t possible, you just end up port scanning their crappy NAT router provided by their ISP unless they have specifically opened up some ports and directed them to their internal IP address.

    Compare this to IPV6 where you get a slice of the public address space to place your devices in and they are all directly addressable. In that case your crappy ISP router also is a “proper” firewall. Strangely enough it usually is a “stateful” firewall with default deny-all rules that tracks network connections and looks and performs almost exactly like the NAT version, just without address translation.


  • The partition table is just a set of pointers to various places on the physical disk where partitions should be, inside those partitions are filesystems with all your data. It’s like the table of contents in a book. You can mess around with the table of contents and make the page numbers for chapters different, but all the words in the book are still there.

    Now you’re lucky that filesystem drivers are fairly smart these days. They sanity check things all the time. When you write the partition table to disk all the active filesystem drivers get notified of the changes, so they can keep track of things. When the driver noticed that the size of your filesystem exceeded the size of your partition, it basically was like “Hold it right there, I’m not touching any of this!”. At that point the filesystem would have been forcibly unmounted and disconnected, which is why none of your commands worked after running cfdisk, they were on that filesystem.

    Note that your approach was almost the right way to do it. To make your filesystem bigger you can expand the partition using cfdisk ( as long as there is physical room on the disk!) and then run a program called resize2fs , and it will expand the filesystem to suit.

    Similarly, you can shrink the filesystem in the same kind of way, except you run resize2fs first and command it to shrink the filesystem to a particular size. It will do that (assuming there’s enough free space in your filesystem to do so) then you shrink the corresponding partition with cfdisk to match.

    Of course, as you’ve learned, resizing partitions is moderately risky so backups are a good idea. Having said that I routinely expand filesystems in VMs like this without backups - I make the VMs disk larger in its settings, then run cfdisk and expand the partition, then run resize2fs.


  • Dave.@aussie.zonetoLinux@lemmy.mlMm.. can someone help?
    link
    fedilink
    arrow-up
    30
    ·
    edit-2
    3 months ago

    The filesystem driver knows the size of the filesystem is larger than the physical size of the partition it is on. Because of that it refuses to do anything with it until that discrepancy is sorted.

    Boot to a USB/ISO, run cfdisk, extend the partition size back to original or larger, then run fsck on the partition again.





  • It sounds like your sync process can create files, but not rename them afterwards.

    That long filename you’ve got now is likely the temporary name you get while the file is being transferred, once it’s fully there it usually gets renamed to what you want it to be.

    Go up one level and check the permissions for the directory the files are in. The permissions should be read-write, otherwise it’d not be able to create files in there at all, but check if the “sticky bit” is set. That stops processes from renaming files once they are made.

    Unfortunately I’m travelling at the moment, but hopefully your file manager will have a way of showing if the “sticky bit” is set for that directory.







  • As the answer in the link explains, it’s adjustment of your scaling factor to the nearest whole pixel, plus a loss of precision rounding to/from single/double floating point values.

    So I’m not really sure of the point of this post. It’s not a question, as the link quite effectively answers it. It’s more just “here’s why your scaling factor looks weird in your gnome config file”, and it’s primarily the first reason - rounding to whole pixels.



  • Dave.@aussie.zonetoFediverse@lemmy.worldDo we own our posts?
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    7 months ago

    How about you read the very first sentence of my little snippet again.

    The very first sentence.

    The sentence that says, “You don’t need to register for copyright in Australia.”

    You know, the sentence that effectively describes what needs to happen if you’re thinking about registering copyright in Australia.

    Perhaps in your country you have to register works for copyright so that the courts will recognise your claims of infringement. Other countries, maybe not so much.


  • Dave.@aussie.zonetoFediverse@lemmy.worldDo we own our posts?
    link
    fedilink
    English
    arrow-up
    20
    arrow-down
    2
    ·
    7 months ago

    The World Copyright Office then?

    Oh wait, three seconds of googling suggests my posts are most likely covered when I post via my home instance in Australia.

    “You don’t need to register for copyright in Australia. The moment an idea or creative concept is documented on paper or electronically it is automatically protected by copyright in Australia. Copyright protection is free and automatic under the Copyright Act 1968.”