Slashdot Mirror


Botched npm Update Crashes Linux Systems, Forces Users to Reinstall (bleepingcomputer.com)

Catalin Cimpanu, reporting for BleepingComputer: A bug in npm (Node Package Manager), the most widely used JavaScript package manager, will change ownership of crucial Linux system folders, such as /etc, /usr, /boot. Changing ownership of these files either crashes the system, various local apps, or prevents the system from booting, according to reports from users who installed npm v5.7.0. -- the buggy npm update. Users who installed this update -- mostly developers and software engineers -- will likely have to reinstall their system from scratch or restore from a previous system image.

256 comments

  1. LOL by ArchieBunker · · Score: 5, Funny

    A shitscript package manager that does a chmod of /etc and /boot? This thing had to have been written by that Poettering asshole.

    --
    Only the State obtains its revenue by coercion. - Murray Rothbard
    1. Re:LOL by RightwingNutjob · · Score: 3, Funny

      I'm guessing 'ownership' is too racist, capitalist, and phalocentric to be a valid concept in filesystem design form much longer.

    2. Re:LOL by jawtheshark · · Score: 1

      Don't give them ideas!

      --
      Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    3. Re:LOL by Anonymous Coward · · Score: 0

      Javascript was a mistake.
      - H. Miyazaki

    4. Re:LOL by Anonymous Coward · · Score: 1

      Do you guys really need to inject your rightwing politics into literally EVERY story????

    5. Re:LOL by Anonymous Coward · · Score: 1

      Do you guys really need to inject your rightwing politics into literally EVERY story????

      I thought it was a reference to the politics surrounding Rust language because this is Slashdot.

    6. Re:LOL by Anonymous Coward · · Score: 5, Funny

      Do you guys really need to inject your rightwing politics into literally EVERY story????

      It's a memorial to the language which attempted to shatter the glass ceiling but was stopped by the patriarchy.

    7. Re:LOL by plopez · · Score: 1

      At least change the name!

      --
      putting the 'B' in LGBTQ+
    8. Re:LOL by Anonymous Coward · · Score: 0

      What right wing politics?

      Making fun of file ownership being too racist, etc. is a centrist (or even center-left) position.

    9. Re:LOL by Anonymous Coward · · Score: 0

      Lighten up, Francis. It's a joke.

    10. Re:LOL by Anonymous Coward · · Score: 0

      Maybe Sindre Soreass committed some unicorns and emoji to it.

    11. Re:LOL by Anonymous Coward · · Score: 0

      No, no, it's an artifact of the male patriarchy!!!

    12. Re:LOL by Anonymous Coward · · Score: 1

      A shitscript package manager that does a chmod of /etc and /boot? This thing had to have been written by that Poettering asshole.

      More likely someone whose main development platform is Windows.

      Considering the amount of developers (and slashdot readers) that have very little grasp of operating system concepts like file permissions this is not a given.

    13. Re:LOL by shaitand · · Score: 3, Interesting

      The thing sucks so bad. I've had a few things that required npm... everyone pretends it's like apt or yum that grab everything you need if you install from a proper repo... npm has never gotten all the dependencies on a fresh clean host for any project I've installed.

    14. Re:LOL by RightwingNutjob · · Score: 1

      That's comedy gold.

    15. Re:LOL by Anonymous Coward · · Score: 0

      I'm guessing 'ownership' is too racist, capitalist, and phallocentric to be a valid concept in filesystem design form much longer.

      The sad thing is, that's a pretty likely scenario in today's America.

    16. Re:LOL by TheFakeTimCook · · Score: 1

      I'm guessing 'ownership' is too racist, capitalist, and phalocentric to be a valid concept in filesystem design form much longer.

      Phalocentric?

      What's my Dick got to do with this???

    17. Re: LOL by Anonymous Coward · · Score: 0

      POLA baby, POLA

    18. Re:LOL by AmiMoJo · · Score: 1

      How come a script can adjust permissions on critical system directories?

      It's always seemed a bit odd that Linux runs stuff like this as the superuser who can basically do anything. No granularity, no account just for installing JavaScript (!) packages... It's like Windows XP again.

      --
      const int one = 65536; (Silvermoon, Texture.cs)
      SJW, n: "Someone I don't like, and by the way I'm a fuckwit" - AC
    19. Re: LOL by Anonymous Coward · · Score: 0

      Are you pretending that Windows installers are not executed as root?

    20. Re:LOL by Anonymous Coward · · Score: 0

      The private sector has changed the ownership of all the common land so only they have access?

    21. Re: LOL by Anonymous Coward · · Score: 0

      everyone keeps saying computers are cattle not pets. when ole betsy breaks a leg...

    22. Re: LOL by Anonymous Coward · · Score: 0

      âoeEverythingâ -Feminists

    23. Re: LOL by Anonymous Coward · · Score: 2, Insightful

      I use npm daily as a non root user. People are just too lazy to take the extra 2 minutes to get it up correctly and instead just throw it to sudo. Run shit as root when there is no reason to and you're gonna have a bad time.

    24. Re: LOL by Anonymous Coward · · Score: 0

      That's Not Funny!111!!!!

    25. Re: LOL by Reverend+Green · · Score: 2

      Your laptop is a pet. Your cloud servers ought to be cattle.

    26. Re: LOL by Anonymous Coward · · Score: 0

      Best comment in the thread!

      Why would you ever run as root? Each project has its own deps, so locally grab packages.

      Are only brogrammers using Linux these days?

    27. Re: LOL by Anonymous Coward · · Score: 1

      You gotta containerize, bro! Just configure Chef to install Puppet on a Docker container on AWS. Once your serverless microservices are in the cloud, you can scale you npm dependencies using git.

    28. Re: LOL by nnull · · Score: 2

      This isn't unusual. It's stupid but not unusual. I've had 'Professional' software developers tell me this is how it's supposed to be. You'll find a lot enterprise software in a lot of industrial settings functioning this way. Giving root access to people that don't understand anything about the system to deal with faults or errors, etc.

      This is now standard industry practice. Stupidity is now standard industry practice.

    29. Re: LOL by Anonymous Coward · · Score: 0

      Oh how I wish that you were joking.

    30. Re: LOL by The123king · · Score: 1
      --
      If you gave me a choice between a printer and a giraffe with explosive diarrhoea, i'll get my ladder and my raincoat
    31. Re:LOL by iTrawl · · Score: 1

      No ideas needed. It was tried in the past in the forms of FAT, even though FAT itself is owned by dear leader Microsoft rather than a public asset.

      --
      "Everybody's naked underneath" -- The Doctor
    32. Re:LOL by Anonymous Coward · · Score: 0

      A lot of users will have the npm program managed by the package manager, and that updater runs with root privileges to update programs................

    33. Re: LOL by nmo.marques · · Score: 0

      ECMA?

    34. Re:LOL by Anonymous Coward · · Score: 0

      A shitscript package manager that does a chmod of /etc and /boot? This thing had to have been written by that Poettering asshole.

      Godwin's second law: As an online discussion about Linux grows longer, the probability of a comparison involving Poettering approaches 1.

  2. Rescue mode by Camel+Pilot · · Score: 4, Informative

    If it is a file permission issue... boot from install disk into rescue mode... chmod and reboot. I don't get it.

    1. Re:Rescue mode by jawtheshark · · Score: 1

      Well, it does get complicated if you don't know what the hell exactly has changed. That said, the "reinstall when broken" mindset has been heavily imported by developers who only know one specific system.

      --
      Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    2. Re:Rescue mode by Anonymous Coward · · Score: 1

      Not always easy if the change was recursive from /. With RHEL at least you can fix most of it with rpm, but it doesn't get everything and something is always missed.

    3. Re:Rescue mode by Anonymous Coward · · Score: 0

      can you come to my house and chmod my files?

    4. Re:Rescue mode by Anonymous Coward · · Score: 0

      Chmod to what? How much effort is needed to restore the correct rwx+setuid+setgid+sticky permission of every affected file?

    5. Re:Rescue mode by RightwingNutjob · · Score: 4, Informative

      Maybe. But the point is it's not acceptable to fuck up users' machines and make them go through all that work to fix it.

      More precisely, I don't know exactly what should be readable by all vs readable by certain groups vs readable by root only in /usr and especially in /etc. I could very well leave my machine's private keys readable by all by mistake. That's a lot of work to track down. So I'd need to reinstall to ensure that it's all correct and I'm not leaving any holes.

      I say again: It's not acceptable to make your users go through that work. And I also say again: automatically and implicitly trusting package maintainers to do the right thing is awful security policy and awful from a reliability standpoint. All updates should be tested before they are deployed. For home users this isn't practical and we have to rely on the distros to do this for us. Trust breaks down severely when fuckups like this go through and it lends credence to people who don't update their software automatically on the grounds mentioned above. This is bad when actual security fixes need to be deployed out, and it's all the more crucial for ALL software maintainers in OSS to make sure their shit works. Trust is the currency of OSS, and unlike dollars, you can't get some more by going to the bank, you have to earn it.

    6. Re:Rescue mode by bettodavis · · Score: 0

      Namely, Windows.

    7. Re:Rescue mode by Stomper_Stoddard · · Score: 2

      I'll bet there will be a script to fix this before dinner.

    8. Re: Rescue mode by Anonymous Coward · · Score: 1, Funny

      It's funny because windows almost always automatically recovers from problems these days. It's literally generations ahead of Linux unfortunately and osx.

      I guess it's because they had lots of mistakes to learn from

    9. Re: Rescue mode by Anonymous Coward · · Score: 0

      My understanding is that this only affects people using the preview releases, which is always a gamble.

      My understanding is also that a whole lot of people are using preview releases without knowing it, possibly due to a shitty release naming scheme by npm.

    10. Re: Rescue mode by Anonymous Coward · · Score: 1

      It's funny because windows almost always automatically recovers from problems these days. It's literally generations ahead of Linux unfortunately and osx.

      +5 Funny.

      I'm guessing you haven't run updates on Windows 10 before.

    11. Re: Rescue mode by Anonymous Coward · · Score: 0

      Are you high? There is no better bare-metal recovery software than restoring from time machine in OS X in any of these systems from an OS perspective. Windows recovers from some things well, others... not so much. Same can be said with Linux and OS X. They each have their tolerances and their intolerances, as for the OS reinstall in this situation.... I can't imagine why a SUM or rescue environment with chmod wouldn't recover the OS? Any insight?

    12. Re: Rescue mode by Computershack · · Score: 4, Insightful

      I'm guessing you've never run Windows 10.

      --
      I only please one person per day. Today is not your day. Tomorrow isn't looking good either. - Scott Adams
    13. Re:Rescue mode by Anonymous Coward · · Score: 0

      Ubuntu? I've had to do that many times cause someone was changed and there was no indication as to what.

    14. Re:Rescue mode by rickb928 · · Score: 1

      "automatically and implicitly trusting package maintainers to do the right thing is awful security policy and awful from a reliability standpoint."

      And this is why this, 2018, is the year of Linux as THE desktop.

      *whoosh*

      --
      deleting the extra space after periods so i can stay relevant, yeah.
    15. Re: Rescue mode by plopez · · Score: 1

      All they have to do is use a scratch system or recover from backup.

      --
      putting the 'B' in LGBTQ+
    16. Re:Rescue mode by plopez · · Score: 1

      And of course 3rd party and custom utilities installed there will not be recovered.

      --
      putting the 'B' in LGBTQ+
    17. Re:Rescue mode by Dracos · · Score: 5, Interesting

      The people most likely to be using npm, and an apparently untested bleeding-edge version of it that gets pushed out automagically (there's a separate bug that pushed out 5.7.0 prematurely), deserve this rancid dog food. This is incontrovertible proof that the JS community lacks competence and leadership.

    18. Re:Rescue mode by bigtreeman · · Score: 1

      No,
      there are varied permissions in my etc folder
      not everything is owned by root:root
      do you know off the top of your head the permissions of all files and folders in /etc,
      good on you.

      --
      Go well
    19. Re:Rescue mode by Anonymous Coward · · Score: 0

      I used Kubuntu for 7 years and KDE Neon User Edition for the last 2.5. Both are based on Ubuntu, and I've never had that problem.

    20. Re:Rescue mode by shaitand · · Score: 1

      In general most developers don't really know any system. How do you think devops came to be.

    21. Re: Rescue mode by Jerry · · Score: 2

      "Windows recovers from some things well, others... not so much. Same can be said with Linux and OS X"

      Don't know about Windows, I haven't run it in 10 years. But, I run KDE Neon on top of Btrfs and there isn't a better FS for Linux than Btrfs. Making snapshots of @ and @home take only seconds and doesn't use any HD space. Rolling back to your last snapshot to recover from anything takes less than 2-3 minutes.

      --

      Running with Linux for over 20 years!

    22. Re:Rescue mode by Anonymous Coward · · Score: 0

      no, but I can figlit your ASS

    23. Re:Rescue mode by shaitand · · Score: 0

      Not an issue though since you've got auditing enabled and could always check against your backup... you DO have a backup right?

    24. Re:Rescue mode by shaitand · · Score: 1

      In fairness... if it isn't for home use and you are using javascript you kind of had it coming.

    25. Re: Rescue mode by Anonymous Coward · · Score: 0

      That filesystem isn't stable.

    26. Re: Rescue mode by AvitarX · · Score: 1

      I had an update take down all three of the PCs where I work (to be fair, they're the exact same system, so it could be at least partially HPs fault).

      I had to do a clean reinstall. Zero data was lost, but it was a huge pain in the ass.

      --
      Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
    27. Re: Rescue mode by Anonymous Coward · · Score: 0

      No kidding, I can't even get office to fix itself using the rescue tool, let alone windows 10 itself. It's a clusterfuck of insanity.

    28. Re: Rescue mode by slazzy · · Score: 2

      Yeah, reinstalling OS X from time machine is so easy it's almost fun.

      --
      Website Just Down For Me? Find out
    29. Re:Rescue mode by Anonymous Coward · · Score: 0

      Dear, the adults are talking about software delivery channels. We're aware that there is no ideal solution. You're neither insightful, nor amusing, and frankly, even as a troll I'd say you could use some improvement. Reddit ought to be just your speed.

    30. Re:Rescue mode by sfcat · · Score: 1

      In general most developers don't really know any system. How do you think devops came to be.

      Just shut up and run this bash script to start the system, you lowly op. And quit trying to show that you know nothing about software architecture...

      --
      "Those that start by burning books, will end by burning men."
    31. Re: Rescue mode by guruevi · · Score: 2

      Haha, hahahahaha, haaaahahahahaha.

      In Windows you can indeed change boot file permissions and the system won't care a bit because everything ignores or is capable of ignoring it. That is wrong.

      Also, recovery is easy for Linux, you can chroot and apt reinstall everything or manually recover permissions. Windows has no package manager much less repair installed applications.

      --
      Custom electronics and digital signage for your business: www.evcircuits.com
    32. Re: Rescue mode by Anonymous Coward · · Score: 0

      Cmon now. You canâ(TM)t be that reasonable when writing a slashdot article! You get out of here with your logic, proper system management/administration, and good ideas!

    33. Re: Rescue mode by Anonymous Coward · · Score: 0

      Is your company hiring?

      Having just 3, not half, but whole entire PCs to administer sounds fantastic!

    34. Re: Rescue mode by HiThere · · Score: 1

      Yes, but I've had problems before where different sub-directories had different permission requirements. Sometimes reinstalling is easier than tracking down every change, especially if you've got decent backups.

      --

      I think we've pushed this "anyone can grow up to be president" thing too far.
    35. Re: Rescue mode by Reverend+Green · · Score: 1

      Reddit - come for the inane trolling - stay for the censorship!

    36. Re: Rescue mode by MikeBabcock · · Score: 1

      Right, because expecting that is reasonable.

      --
      - Michael T. Babcock (Yes, I blog)
    37. Re:Rescue mode by jrumney · · Score: 1

      If it has chmod -R a whole hierarchy to its own preferred universal permission (formerly 777 which noone noticed, but one of the devs read a blog about security and changed it to 600 for this release), then putting back the original permissions for all the thousands of files and directories is a major task. You basically need to install another system as a reference to copy the permissions from, so you might as well reinstall everything.

    38. Re:Rescue mode by niftydude · · Score: 1

      Yeah it's not like the bumblebee sudo rm -rf /usr bug. Now THERE was an update that needed a reinstall!

      https://github.com/MrMEEE/bumb...

      --
      You can never know everything, and part of what you do know will always be wrong. Perhaps even the most important part.
    39. Re: Rescue mode by nnull · · Score: 1

      How stable is btrfs? I've been using zfs for a while now, but I do get annoyed with updating zfs with the kernel due to licensing restrictions.

    40. Re: Rescue mode by Anonymous Coward · · Score: 0

      I've had to disable Windows 10 updates on one of my computers because it'll kill it every time.

    41. Re:Rescue mode by thegarbz · · Score: 1

      If it is a file permission issue... boot from install disk into rescue mode... chmod and reboot. I don't get it.

      Chmod to what? Do you remember what the user and group permissions on every single file on your system were?

      Seriously, it's easier to reinstall.

    42. Re:Rescue mode by thegarbz · · Score: 1

      The people most likely to be using npm, and an apparently untested bleeding-edge version of it that gets pushed out automagically (there's a separate bug that pushed out 5.7.0 prematurely), deserve this rancid dog food.

      So Javascript developers then.

    43. Re:Rescue mode by Malc · · Score: 1

      It's a breathtakingly poor development process that led to this collossal fuck-up, Do you really think they haven't tested at all though, or they just don't work in an enviroment that mimics their users, or don't test the same package that goes to users? How does a development change get to users with npm?

      I've worked with QA teams that test different build artefacts than the ones that go to customers because they don't want to deal with installers and things like that in their automated environments. And I've seen this approach miss basic issues, but when this happens there's always an excuse and the very next test case gets implemented the wrong way again because it's habit and easier. Very frustrating.

      And in fact the story seems to suggest to me that they have poor practices and perhaps work/develop/test as root:

      Running the npm update commands as root doesn't result in npm trying to reassign root ownership to all files, so the issue appears to affect only npm update operations prefixed by a sudo command.

      The other thing that boggles the mind in the story is:

      The bug was first reported a week ago but was left without an answer from npm developers.

      Are you serious? A week has passed with something this serious, and they haven't responded in any way? That tells me there is a systemic or attitude problem that won't be changed easily or quickly. Users of npm should consider weening themselves off this and finding some other solution, of which there is a selection to look at and try.

    44. Re: Rescue mode by The123king · · Score: 1

      I'm guessing you've never run Windows

      --
      If you gave me a choice between a printer and a giraffe with explosive diarrhoea, i'll get my ladder and my raincoat
    45. Re: Rescue mode by Anonymous Coward · · Score: 0

      Windows has restore points that you can call from a system scheduler. And any update should start with a system restore point.

      Also NTFS support shadow copy, so snapshots are available.

      The problem is most home systems are not set up for either data reliability or proper backups. A snapshot is still on the same disk (unless raid) and corruptible.

      So linux is not magically better in this case.. both environments can do what the other can.

    46. Re: Rescue mode by Anonymous Coward · · Score: 0

      Actually, it doesn't recover, what Windows 10 does is attempt to install an update 3 times then give up and move on to other updates. When other updates are done it then re-attempts the failed update 3 more times and repeats ad nauseam. Eventually, user intervention is required by either running the Windows Update Assistant tool from Microsoft, or by manually clearing out the update download cache and/or Windows Upgrade folder, where the problem is likely a corrupted download.

      Linux is infinitely worse, I've never had automatic updates on any Linux distro not break something that required obscure terminal voodoo to fix. Microsoft is certainly doing far better but there are obvious improvements they could still make. Linux is hopeless since no distro is usable without a terminal and no desktop user wants to deal with a terminal.

    47. Re: Rescue mode by jeremyp · · Score: 1

      Almost since day 1, OS X had an option to repair file system permissions in Disk Utility.

      Windows is not generations ahead of OS X or even ahead really,

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    48. Re: Rescue mode by Anonymous Coward · · Score: 0

      Reddit is for aspie faggots who need a safe space

    49. Re:Rescue mode by Anonymous Coward · · Score: 0

      "I don't get it" is really the salient point.

      Obviously anyone suggesting that you merely chmod a half-million files by rote hasn't got the slightest clue.

    50. Re: Rescue mode by Anonymous Coward · · Score: 0

      And the file system check tool does not find errors that cause the actual NTFS driver to refuse to even mount the file system. How awesome is that?

  3. I remain of the opinion... by jawtheshark · · Score: 5, Insightful

    I remain of the opinion that none of those "language specifically package managers" have no place on Linux systems. They should use the operating systems package managers and tools.

    --
    Ahhh...the great dumpster continuum. Many a free computer will be found there. -- sowth (748135)
    1. Re: I remain of the opinion... by Gojira+Shipi-Taro · · Score: 3, Interesting

      Good luck with that. Having a packafing system for a language allows consistency across platforms. Otherwise you're at thw mercy of the platform team, or you have to maintain separate packages for platforms woth different release and maintenance cadences.

      --
      "Oh my God. This is terrible. This is the end of my Presidency. I'm fucked."; ~ Donald J. Trump
    2. Re:I remain of the opinion... by BlueLightning · · Score: 5, Informative

      I'd recommend watching this talk:

          https://www.youtube.com/watch?...

      or if you prefer, the excellent-as-usual LWN summary:

          https://lwn.net/Articles/71231...

      I don't like the language-specific package manager situation either, but the way these languages split things up does not lend itself well to the distro packaging model either unfortunately.

    3. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      While this may be, these package managers are completely different beasts from OS package managers. They manage build-time dependencies that don't translate into runtime dependencies, and the packages they manage are cross platform.

    4. Re:I remain of the opinion... by PPH · · Score: 4, Insightful

      This.

      Or nothing other than the system package manager should run as root. Create a top level sub directory and a product specific user/group. And then let it run in it's own file space as its own user. There is very little on a *NIX system that HAS to be owned by root. As long as it's readable and executable by all, that's good enough.

      --
      Have gnu, will travel.
    5. Re: I remain of the opinion... by Anonymous Coward · · Score: 1

      Just as the all powerful and all knowing neck-beards intended!
      If it can't be written in awk, sed, bash or perl, does it need to be written at all?

    6. Re: I remain of the opinion... by Anonymous Coward · · Score: 0

      Great. So when I package my node.js app for linux and Windows it's dramatically more work, and dependency management becomes a nightmare.

    7. Re:I remain of the opinion... by dos1 · · Score: 1

      Well, yes and no. While some managers, like Cargo, are strictly for build-time dependencies, others like npm, pip or RubyGems can also manage globally installed libraries and apps. This bug actually manifested itself in such global installation.

    8. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      Part of the issue there is with a "new language" there is a flurry of rapid development. Pushing a package through, lets say, the ubuntu repositories takes way too long for the process to be useful.

    9. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      I remain of the opinion that node and npm are just programs that I as a user might want to run. Like many others.

      I should be able to use it without it having any effect on the operating system.

      Just as surely as I can write any program in C that I can dream up and compile it and run it.

      As such, it can have whatever module loader it likes.

      Some other user of the same system may not want node. Or perhaps they want to use a different version that they know and trust to work for them.

      This is totally a different thing to the package manager we use to maintain operating system components.

    10. Re:I remain of the opinion... by Dracos · · Score: 1

      Some npm packages are as little as 7 lines of code... they have more metadata than content. Do you really want all that (350,000 packages as of January 2017) cluttering up your OS-level package manager?

    11. Re:I remain of the opinion... by CustomBuild · · Score: 1

      I remain of the opinion that none of those "language specifically package managers" have no place on Linux systems. They should use the operating systems package managers and tools.

      Language specific package managers have a place on Linux systems? !!true

    12. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      systemd should do this!

    13. Re:I remain of the opinion... by aberglas · · Score: 1

      Indeed. Install as Root is the killer of both *nix and Windows. What is the point of having a permission system if every program we run needs to have root on install.

      IOS taught us the right way. That we should be able to install third party software and not give it complete control of our systems. Well, almost...

    14. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      The problem is npm installs "global" packages lazily instead of locally in a users folder and theres plenty of packages on the npm registry that are tools you would use outside nodejs. So...you do a sudo npm install and get said tool universal to every user......and welp.

    15. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      YES!! Developers often take the "easy" path of running everything as root because they don't take the time to understand *nix permissions. I've reprimanded others for doing "chmod -R 777 *" in selected areas.

    16. Re:I remain of the opinion... by Junta · · Score: 2

      Eh, not really, except *maybe* the rust situation, but even that has been accommodated (by having the major version of a package embedded in the name of the package).

      First, the general answer that 'locks on to versions' is a recipe for security and bug nightmares. In that universe, no longer is it feasible for a foundational library to fix the problems they caused all on their own, becuase the apps statically linked. An openssl tweak means the world has to be rebuilt becuase everyone baked it in instead of relying upon the contract of a major version.

      One of the main problems is that developers have no interest in anything that would constrain them, and honoring a contract where they fix things in an API and ABI compatible way is just such an annoyance they won't bother with. By extension, they don't want to ever promise that 2.1.2 will be compatible with 2.1.1. The fix for this has thus far professional linux companies paying people to do the 'boring' work of back-porting fixes to declared stable development bases.

      However, there are practical limits to what the enterprise distros can do, so inevitably, there is going to be a body of assets out there with attractive features, but no one backing it. This seems 'fine' to a new developer and they ride the wave. Until that wave crashes, and their app depending on 'foo' causes a problem when foo went to 2.1.2 from 2.1.1 and broke compatibility. This pain is inflicted enough they say "that's it" and put in their requirements "we require *exactly* foo 2.1.1", and they start doing this proactively on all their packages.. Rather than targeting a 'stable' release, they target an arbitrary "it seemed to work at the time version", with no one supporting that particular vintage. They then move on, forgetting entirely about the project that now bores them, and all the security and other bug fixes that happen after 2.1.1 are denied to users of that app. The concept of installing multiple applications in the same namespace becomes impossible, as they all start depending on versions that are mutually incompatible.

      Essentially, the ugly mess that is npm, pypi, etc is a symptom of a much bigger problem, a lack of discipline in major projects. The result is either an unusable mess or a dangerously unmaintained stack. Note that this is not a 'young folk' problem, there are plenty of people getting into the market recognnizing the problem and sticking to technology choices that sidestep it. The problem is the people who do try and fail to ride the wave of random software updates are very *loud* about their problems, and their problems simply must be solvable using some technology, not having to adjust or be mindful of the policies of the teams that back the tools they want to use.

      Javascript suffers more due to the reluctance of extending the base for utterly common tasks, causing people to invent frameworks and libraries to do things like simple string formatting, which is standard in *every* other language, but not javascript.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    17. Re:I remain of the opinion... by Junta · · Score: 1

      When I ship software, the "language packager" is my first step to make a distro package. However, a large contingent of my users use the language package management to get the applications to use directly, despite having zero developer interest.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    18. Re:I remain of the opinion... by Junta · · Score: 1

      That's a problem in and of itself. There's no sane reason for such a small function to be a library all it's own, rather than coordinated in a larger, cohesive project.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    19. Re: I remain of the opinion... by Anonymous Coward · · Score: 0

      I agree, these things should not be root.

    20. Re: I remain of the opinion... by Anonymous Coward · · Score: 0

      Most neckbeards know python too

    21. Re:I remain of the opinion... by Junta · · Score: 1

      Note that I agree with you, however people going after copr or ppa sorts of repositories have equal amounts of ability to screw over a system. The general impatience that leads to using the free0for-all package manager associated with a language will also lead to a free-for-all of yum/apt repositories.

      Of course, the quality of rollback solutions is higher with the distro manage, hence my agreeing with you, but the problem is still complex beyond just using the crappier package management.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    22. Re:I remain of the opinion... by Lord_Jeremy · · Score: 1

      The macOS package manager Homebrew (http://brew.sh) has some flaws but one of my favorite features is that it operates entirely within its own tree at /usr/local/Homebrew. Installing the package manager in the first place requires root to gain permission to write in /usr/local but after that, all operations are done at user permission levels.

    23. Re: I remain of the opinion... by viperidaenz · · Score: 1

      What if you need to install python to run the python install scripts to install python?

    24. Re: I remain of the opinion... by Anonymous Coward · · Score: 0

      You mean every app in a sandbox? That's quite contrary to the unix way.

      Also, 'little silos everywhere' does not scale that well. It's fine for a little gadget that doesn't matter.

    25. Re:I remain of the opinion... by Dracos · · Score: 1

      JS kiddies take DRY to previously unfathomable heights of zealotry, and can't abide including code they don't need. Their eternal quest for perfect code mass optimization explains a lot of the problems with how JS has evolved.

    26. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      So the malware running in your browser or pdf reader can infect your machine easily? Nice..

    27. Re: I remain of the opinion... by thegarbz · · Score: 1

      Otherwise you're at thw mercy of the platform team

      You do realise this is why Linux "distributions" exist in the first place right? Seriously the dependency for everything in the system should be maintained by one group and one group only. Otherwise you end up with some package manager making a change to a system incompatible with another package manager and the entire mess gets royally screwed.

      The only time I've ever been forced to nuke the root partition and start from scratch in Linux was due to complete loss of plot by a package manager.

    28. Re:I remain of the opinion... by Malc · · Score: 1

      This might work if you only support one platform. But now you need to do something for macOS (ports, homebrew, appstore?) and for Windows (msi, appstore, something else?) All very different, so I'm pretty sure it's less effort and cost to have a common solution specific to your language. But perhaps there is a place for a language neutral cross-platform package manager, but that would take a lot of effort to overcome the momentum behind things like Perl's CPAN or Python's PiP.

    29. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      Such system-wide package managers should not exist, but there is a lot of value in more isolated systems. The language specific package managers should be isolated from the system, e.g. like Maven in the Java world. The Maven system of specifying dependencies with the triplet of groupId, artifactId and version number allows different projects to use different implementations and versions of libraries which moves the dependency hell problems strictly inside projects (or the hierarchy of a project and its dependencies) instead of being system-wide.

    30. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      By extension, they don't want to ever promise that 2.1.2 will be compatible with 2.1.1.

      By definition, any externally visible change (including bug fixes) are not 100% compatible with the previous version. It is always possible that some code depends upon the previous behavior. In other words, there is no real way to guarantee compatibility. They may be able to guarantee that documented behavior doesn't change, but that too is dicey. Sometime one figures out that the documentation isn't right and it is better to change the doc than change the code to match the doc. (Here's a neat example about the edit control in Windows doing the "wrong" thing but nobody dares fix it: https://blogs.msdn.microsoft.com/oldnewthing/20070820-00/?p=25513)

      Of course, most bug fixes are improvements and won't change previously correct code. But guaranteeing that is a whole other problem.

    31. Re: I remain of the opinion... by coofercat · · Score: 1

      I'd like to see all non-OS package managers just run as a user (not root). They can throw all the crap they want wherever they like in their own directories, but for all the root-owned stuff, use an OS package like everyone else.

      Whilst I'm being a bit angry about this, I think it would actually lead to a far better (and safer) solution than we have today. The likes of NPM can run as the 'npm' user and can do nightly updates if they want, and I, the sysadmin will know that it's 'safe' in so much as it'll only ever mess up the Javascript stuff on the box. If I run "yum install" or whatever, then I'm taking the risk, so I'll be responsible for the outcomes.

      I could see this being useful for Python PIP and Perl CPAN libraries too - it would mean that you could even have devs install system-wide language libraries if you wanted (all 'risk free' in the broader sense). It means the devs are responsible for the language stuff, and the sysadmins are responsible for the system.

    32. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      agree

    33. Re:I remain of the opinion... by Junta · · Score: 1

      Practically speaking, we see fixes all the time. Occasionally there is 'glitchy' behavior that is somehow useful, but the vast majority of the time, glitchy behavior has no practical use. As you say, there are examples, but in your example they don't dare fix it, which is evidence that some groups care about compatibility, even if it didn't behave the way they meant for it to behave. In such a case, you decide either 'a', the desired behavior wasn't needed or 'b', implement a new function to supersede with the desired behavior and be forever left with the 'wrong' version of the function.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    34. Re:I remain of the opinion... by PPH · · Score: 1

      So make it a different user.

      --
      Have gnu, will travel.
    35. Re: I remain of the opinion... by ilsaloving · · Score: 1

      Otherwise you're at thw mercy of the platform team, or you have to maintain separate packages for platforms woth different release and maintenance cadences.

      That's one way to look at it.

      Another way of looking at it is making use of exist stable ecosystems. It makes you mindful about playing nicely with others. It forces you to do things properly instead of taking cheap shortcuts because the regular way is too "inconvenient". It forces you to plan ahead and try to avoid making sweeping changes that risk breaking backward compatibility.

      Of course, this is again condemning the JS community because they are patently unwilling/unable to do any of these things. So... as you said...

      Good luck with that.

    36. Re:I remain of the opinion... by Anonymous Coward · · Score: 0

      apt/dpkg (and actually probably all package managers) does build-time and run-time dependencies.

    37. Re:I remain of the opinion... by Junta · · Score: 1

      Yeah, the "don't reinvent the wheel" is extreme.

      I would figure by now there could be libraries of many functions, with a build tool to strip out disused functions as part of minification. Even if things stayed as poor as the code seeing distinct files, would think there would be curated collections of these things rather than a free-for-all repository, where authors can update, add, replace, and remove as they like.

      Of course, one would have also hoped the language to get more standard library functionality, having a richer environment built into the browsers rather than having to read big runtimes from the internet all the time.

      Maybe the mindset of the loudest contingent of the JS community is just not suited to maintainable ecosystem, but at least there do exist those careful about this sort of thing. Unfortunately it seems the ecosystem and tools aren't really there to serve those sensibilities well currently, and it's harder than it needs to be.

      --
      XML is like violence. If it doesn't solve the problem, use more.
  4. It would freak some out by Anonymous Coward · · Score: 0

    I'll bet some new Linux users would freak out. Hey it happens, and yet this probably affects way fewer users then it happening on Windows. So hardly anyone will care.

  5. Containers by Anonymous Coward · · Score: 0

    Time to introduce containers like Singularity or Docker!

  6. node.js is malware by Anonymous Coward · · Score: 1

    Another good example of why millenial hipsters have a lot to learn. While javascript outside a browser isn't the core problem here, it's a symptom of the problem. Another symptom of that same problems is a package manager that does idiotic stuff like this, and apparently needs more than userspace perms to run?

  7. permissions by pD-brane · · Score: 1

    If one knows the correct permissions, you could just change them back (via grml or so).

    That said, this is bad. It underlines related issues of the apparently bad package management situation we're in. Why can I not install all my software through a good package manager? GNU Guix?

  8. npm means you have no distro package manager? by Anonymous Coward · · Score: 0

    Why the fuck would you have to reinstall the system are these people run 1994-era sls systems or lfs. Most linuxsystems in production has a basic rights database in at least one place that will allow you to fix those permissions and if you value your systems integrity in more than one.

    1. Re:npm means you have no distro package manager? by Junta · · Score: 1

      If a system is "in production" but using npm to manage it, that backup database is not particularly relevant to the state of the system. I have seen projects that say to install an rpm, then immediately start modifying parts of it becuase the developer wanted to customize. Use of the package manager means discipline, and using npm to deploy stuff as admin represents *not* having that discipline.

      --
      XML is like violence. If it doesn't solve the problem, use more.
  9. EUID != UID by Anonymous Coward · · Score: 0

    Enough said

  10. windows has better group permissions and muilt use by Joe_Dragon · · Score: 1

    windows has better group permissions and multi user ones.

  11. Running npm as root by Anonymous Coward · · Score: 0

    Why, for the love of God, would you do that?

    1. Re:Running npm as root by glitch! · · Score: 2

      "Well, it seemed like a good idea at the time. But looking back, I can see it was a bad idea giving guns to monkeys."

      --
      A dingo ate my sig...
    2. Re:Running npm as root by plopez · · Score: 1

      You don't have to be root to run it?

      (that was a joke btw)

      --
      putting the 'B' in LGBTQ+
    3. Re:Running npm as root by Anonymous Coward · · Score: 0

      Why, for the love of God, would you do that?

      Actually, it was running a pre-release version of npm as root on a production server...

    4. Re:Running npm as root by i_ate_god · · Score: 1

      The only reason to run npm as root is the same as the only reason to run pip as root.

      Instead, you should use nvm or something similar with node stuff, and virtualenv with python stuff, then you don't need root.

      --
      I'm god, but it's a bit of a drag really...
  12. yum reinstall * and reedit any changes by hand by Joe_Dragon · · Score: 1

    yum reinstall * and reedit any changes by hand?

    That will be $75/HR or I can just reload from backup.

    1. Re:yum reinstall * and reedit any changes by hand by plopez · · Score: 1

      Sounds simple. But what about 3rd party apps installed or apps developed in-house? If there are a fair number of those you're hosed.

      --
      putting the 'B' in LGBTQ+
    2. Re:yum reinstall * and reedit any changes by hand by shaitand · · Score: 1

      Backups, daily snapshots, etc. Hell, apps developed in house should be set up in containers and replaced with a couple commands.

    3. Re:yum reinstall * and reedit any changes by hand by Anonymous Coward · · Score: 0

      If you can't fix the permissions on apps developed in-house, you is fucking hosed anyway.

    4. Re:yum reinstall * and reedit any changes by hand by twistedcubic · · Score: 1

      You only charge $75/hour??? Have some self-respect for the profession, man!

    5. Re:yum reinstall * and reedit any changes by hand by Anonymous Coward · · Score: 0

      that is in house rate to other units

    6. Re: yum reinstall * and reedit any changes by hand by Anonymous Coward · · Score: 0

      Charge more, broham. You're dragging down our profession.

    7. Re:yum reinstall * and reedit any changes by hand by plopez · · Score: 1

      Every developers system I've seen was hosed. That's why never test on dev boxes.

      --
      putting the 'B' in LGBTQ+
  13. so one script for each os base line? and not added by Joe_Dragon · · Score: 1

    so one script for each os base line? and not any added software that has it's own per app rights.

  14. Re:windows has better group permissions and muilt by sjames · · Score: 0

    Not really. It's just that a lot of Unix people don't use/know about ACLs in Linux. try man setfacl.

    In general, you can achieve similar results using conventional unix permissions, but it takes a bit more work. You just create a group to represent a directory tree that needs to be useable by a subset of the users on the system, and then assign the relevant users to that group.

  15. But the good news is by Anonymous Coward · · Score: 0

    The quick response and patch actually shows the advantages of agile, iterative code-first development using pair programming and Scrum, continuous integration and release early and often.

  16. but how much software does it by ACL's? by Joe_Dragon · · Score: 1

    but how much software does it by ACL's? some from repo installs may just do it the old non ACL way.

    1. Re:but how much software does it by ACL's? by sjames · · Score: 1

      Other than the system tools, why should it be up to the software to deal with it at all?

      I use ACLs in a few situations and take care of the apps that don't even know ACLs exist (all of them) using default ACLs on the relevant directories.

    2. Re:but how much software does it by ACL's? by Anonymous Coward · · Score: 0

      but how much software does it by ACL's? some from repo installs may just do it the old non ACL way.

      At least for Debian's APT packages, about as many packages use acl's as installers for Windows software do. That is, a very rare and tiny number of them.

      Windows will by default inherent permissions on a newly made folder from the parent folder.
      It's completely up to an installer program to change this, and in most "userland" style applications it just simply isn't needed.

      Linux deb packages usually set newly made folders to the permissions that match the rest of the system, although some things (think webservers or database engines) will restrict things further to a specific group created just for that package.
      It's completely up to a deb package install script to change this, and again most "userland" style software simply doesn't need to.

      By far the typical settings are that only administrator/root can write to it, and everyone else has read-only.
      Aside of deep system level things, and software that is explicitly for security management or modifications, there's just no need.

  17. Fix Already Out by Anonymous Coward · · Score: 1

    Fix available now.

  18. Re:windows has better group permissions and muilt by Anonymous Coward · · Score: 0

    Better than what? Windows uses the same sort of versatile ACLs that other OSes have, but lacks the convenient oldschool UNIX permissions. Windows' group permissions are slightly worse in one specific way but don't have any advantages over the competition to make up for it.

  19. Incredible by Anonymous Coward · · Score: 0

    So even Linux isn't immune to shit updates.

  20. Who runs npm as root? by Anonymous Coward · · Score: 0

    This is silly.

    Who is pulling down and running unknown, untested code onto production servers?

    Why is anyone even using npm as root or with sudo? After years of node use I have never had to do that.

     

  21. Less than a 3 minute rescue... by Anonymous Coward · · Score: 0

    You do run Btrfs, don't you? And you do make timely snapshots of your system, don't you?

    If you do, then rollback to your last good snapshot and reboot. Done.

  22. Re:windows has better group permissions and muilt by shaitand · · Score: 1

    "Not really. It's just that a lot of Unix people don't use/know about ACLs in Linux. try man setfacl.

    In general, you can achieve similar results using conventional unix permissions, but it takes a bit more work.
    "

    In practice it really only comes up in a small subset of use cases.

  23. losar losar bleepingcomputar by Anonymous Coward · · Score: 0

    People who use node typically aren't the beardy types who know this sort of thing. So by their own ignorance they end up having to retry, reboot, reinstall. Guess why poettering software is so popular in those circles these days.

  24. Ugh by i_ate_god · · Score: 5, Insightful

    1. There is no reason to run a language-specific packager as root, whether npm, pip, composer, maven, etc. Either the package manager makes packages available to the user in $HOME, or there exists some kind of virtual environment tool. Use them.
    2. Why is NPM chowning anything?
    3. Read the thread, the attitudes there are unfortunate to say the least. A new version of NPM is provided when using NPM to upgrade itself without any arguments, and it grabs a "pre-release" version without warning? The version number is 5.7.0, not 5.7.0-beta or 5.7.0-rc1 or whatever. The NPM people violated semver. So there was no obvious way to know this is not an official release.

    --
    I'm god, but it's a bit of a drag really...
    1. Re:Ugh by Anonymous Coward · · Score: 0

      semver is a great idea.

      As long as everyone understands it and plays by the rules.

      We can assume that this is not going to happen all the time. So just ignore it.

      Question is, why is anyone downloading and running random untested crap on production servers?

      Why is anyone downloading and running random untested crap as root or with sudo?

      Why is anyone complaining when they do such stupid things and everything breaks?

    2. Re:Ugh by Junta · · Score: 2

      Easy, because there's a large body of content saying "it's ok to do all that stuff, because continuous delivery!".

      Some people will say "but that's not what it means" and some of those will have very reasonable implementations and call it that. While they are doing right by themselves and their team, they only make the problem worse because others see 'success' and decide that downloading and random code in production is ok, because this other guy did it and it seemed to work out.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    3. Re:Ugh by coofercat · · Score: 1

      This reminds me of the Jenkins (centos) RPM. It used to do all the package extract and then did a 'chown -R /var/lib/jenkins' - innocuous enough, given everything in there should be owned by Jenkins anyway. The trouble was, some of us had gigabytes of files and jobs in there (in my case, it got so big we had to put it on an NFS share), so the chown would literally take hours/days. It took 2 years to get the issue fixed: https://issues.jenkins-ci.org/...

      OS packaging is actually pretty hard unless you know everything about everything. Keeping things simple (ie. not root owned) makes life considerably less risky.

    4. Re:Ugh by BlueUnderwear · · Score: 1

      https://issues.jenkins-ci.org/... [jenkins-ci.org]

      Why the hell did they think it necessary to hide the vertical scrollbar :-(

      --
      Say no to software patents.
    5. Re:Ugh by MikeBabcock · · Score: 1

      Call me paranoid, but I don't even like running these in my home directory -- that's where all *my* files are. I prefer to have a different user for doing this stuff whenever possible.

      --
      - Michael T. Babcock (Yes, I blog)
  25. Who the fuck uses node anyway? by Anonymous Coward · · Score: 0

    Non programmers, thatâ(TM)s who.

    What a fucking joke. JavaScript sucks.

    1. Re:Who the fuck uses node anyway? by Anonymous Coward · · Score: 0

      Non programmers, thatâ(TM)s who.

      What a fucking joke. JavaScript sucks.

      How about you get a REAL PHONE that doesn't trash your posts with stupid looking characters??

    2. Re:Who the fuck uses node anyway? by Anonymous Coward · · Score: 0

      Are you from 1980s?

    3. Re:Who the fuck uses node anyway? by DontBeAMoran · · Score: 1

      You blame his phone for using standard unicode characters that are unsupported by Slashdot?

      --
      #DeleteFacebook
    4. Re: Who the fuck uses node anyway? by Anonymous Coward · · Score: 0

      iPhones are real phones you dimwit.

      How about slashdot move into the late 20th century already?

  26. sudo bites again by tender-matser · · Score: 2

    What is not mentioned in the summary is that the bug only shows up when using sudo.

    Sudo is a nightmare, both technically and psychologically (strangely, it's seems easier to run 'sudo npm' or 'sudo fuck_me' than running the same commands when logged in as root).

    It makes me laugh any time when I try to build some shitty program (inside a vm, of course), and more often than not, it tries to run 'sudo' from the install rule and trash over my system by writing and overwriting files inside /usr and /etc, and ignoring any PREFIX option, despite that convention being almost 40 years old.

    I really don't understand the appeal of 'sudo' -- what's the problem with ssh root@localhost with public key authentication?

    1. Re:sudo bites again by Anonymous Coward · · Score: 0

      What is not mentioned in the summary is that the bug only shows up when using sudo.

      Sudo is a nightmare, both technically and psychologically (strangely, it's seems easier to run 'sudo npm' or 'sudo fuck_me' than running the same commands when logged in as root).

      It makes me laugh any time when I try to build some shitty program (inside a vm, of course), and more often than not, it tries to run 'sudo' from the install rule and trash over my system by writing and overwriting files inside /usr and /etc, and ignoring any PREFIX option, despite that convention being almost 40 years old.

      I really don't understand the appeal of 'sudo' -- what's the problem with ssh root@localhost with public key authentication?

      Some OS vendors think their customers are "snowflakes" that have to be protected from the real truth found inside Unix and UNIX-like OS ...

      ... since snowflakes are well known to be unable to handle the truth ... about anyhting.

    2. Re:sudo bites again by Anonymous Coward · · Score: 1

      Good luck. You're going to get downvoted to hell with that kind of talk :) The sudo / debian cancer is everywhere. This is the same class of people who think doing things like:

      curl http://foo.bar.com/install.sh | sh -

      Is completely acceptable. The same class of people who fail to understand the difference between /usr/bin and /bin, basic understanding of UNIX permissions, or group ownership. Wouldn't at all surprise me if "docker" is proposed as a solution.

      Fun link : https://github.com/nodejs/security-wg/tree/master/vuln

    3. Re:sudo bites again by Anonymous Coward · · Score: 0

      I really don't understand the appeal of 'sudo' -- what's the problem with ssh root@localhost with public key authentication?

      This is what I do everywhere. I'd like to hear the arguments against it also.

    4. Re:sudo bites again by maz2331 · · Score: 1

      My first command when doing admin stuff is usually "sudo -i" to get me a root user shell. Repeatedly typing "sudo" is a waste of 5 keystrokes.

    5. Re:sudo bites again by Junta · · Score: 2

      It's really ubunutu that popularized sudo as 'the way'.

      To be fair, the order of the day prior to that was that people logged in as root to avoid the hassle, sudo is better than that.

      To those suggesting 'su is better' or 'ssh root@localhost' is better, any popularized approach would ultimately land in the same land of abuses.

      Of course unless you setup sudo :NOPASSWD, that's just stupid and not the way any of those things come by default.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    6. Re:sudo bites again by pnutjam · · Score: 1

      I was taught:
      # sudo su -

    7. Re:sudo bites again by Anonymous Coward · · Score: 0

      Nope, I wam my environment as root :)
      just :
      sudo su

    8. Re:sudo bites again by ilsaloving · · Score: 1

      It's not sudo that is the problem. Sudo actually has some good reasons for existing, nost notably, auditibility. If someone SSHes into a box as root, all you know is that someone logged in as root. But if you sudo, you know exactly who requested root privileges because it's all recorded in the audit log.

      The problem is the fact that all this software is written by shitty developers who think that they are special and don't need to play nicely with anyone else.

      This is no different from the Windows world where applications would run roughshod all over the place, placing their files god knows where and just assumed that the user had admin privileges. Then when you tried to run the software as a non-admin, it would break, despite the fact that there was no bloody good reason for this thing to need admin privileges.

      And now thanks to NPM and all the other javascript crap, all these shitty developers now think they're rockstar linux developers and linux is starting to see the exact same problems.

    9. Re:sudo bites again by pnutjam · · Score: 1

      yeah, I usually want root's environment.

    10. Re:sudo bites again by Anonymous Coward · · Score: 0

      That it's rather silly/stupid to go through the network stack just to get a local console?
      It's also not more (probably less) safe than a local root password and su.

    11. Re:sudo bites again by tender-matser · · Score: 1

      Sudo actually has some good reasons for existing, nost notably, auditibility. If someone SSHes into a box as root, all you know is that someone logged in as root.

      That's not true. You also know WHOSE KEY was used to log in, and where from. That info is logged by default to /var/log/auth.

      But sudo really has a unique feature -- the insults it prints when a bad password was entered. To replicate that, you really need custom mods or whatever.

      As to shitty developers & such, I'll notice that the setuid mechanism is not one of the most intuitive or robust features of unix; there are very few people who really understand the split personality and dance between the real, effective and saved-set-uid, and many were badly bitten when writing "safe" code in setuid programs.

  27. Ok i have never heard of this... by Anonymous Coward · · Score: 0

    [coward@omm ~]$ sudo pacman -S npm
    resolving dependencies...
    looking for conflicting packages...

    Packages (4) http-parser-2.7.1-1 nodejs-9.3.0-1 semver-5.4.1-1 npm-5.6.0-1

    Total Download Size: 8.19 MiB
    Total Installed Size: 39.46 MiB :: Proceed with installation? [Y/n] n

  28. don't use sudo on production systems by Anonymous Coward · · Score: 0

    sudo is used to bypass normal sane security mechanisms ... don't do that

    if you think you need sudo, you're doing it wrong

    1. Re:don't use sudo on production systems by techno-vampire · · Score: 1

      You sometimes need root access, such as for system upgrades or maintenance, but for that, you really should use su, and if you don't have the root password, you shouldn't be doing that kind of thing anyway.

      Back in the late '90s, I was doing tech support for an ISP, and part of my job was running database queries (through shell scripts) while logged into a server via telnet. (The server was behind the firewall and you couldn't reach it from outside, so this was safe.) Some of the scripts used sudo, but I'm guessing that we were actually pretending to be whoever owned the databases, not root. If nothing else, it seems a tad heavy handed to let everybody in tech support have such easy root access. (I'm guessing because the calls to sudo were part of the script, so I never actually saw that code.)

      --
      Good, inexpensive web hosting
    2. Re:don't use sudo on production systems by viperidaenz · · Score: 1

      so when I run "sudo apt-get update" i'm doing it wrong?
      If I don't run "apt-get update" as root it doesn't work. Does that mean Debian has been doing it wrong for two decades?

    3. Re:don't use sudo on production systems by Anonymous Coward · · Score: 0

      Yes and no. No, because you need to be root to run apt. Yes because sudo is typically installed such that no password is required. Even when a password IS required, it's the users not root.

      The more established way would be to become root with "su -"

      There's also a big difference between what is expected in enterprise environments and end users on a desktop.

    4. Re:don't use sudo on production systems by pnutjam · · Score: 1

      sudo gives you logging. It also lets you dictate what commands are allowed to run.
      So long as you mange the permissions on the scripts and commands the "sudo" user can run, to avoid changes, it's a great tool.

      Best practice is for users to logon with their own account and 'sudo su -' to root, if they are root authorized. Otherwise, they get a list of sudo commands they can run, and they don't get root.

    5. Re:don't use sudo on production systems by pnutjam · · Score: 1

      Every enterprise environment I've worked on uses sudo. Shared account passwords are a no-no, so typically the root password is not given out, or it is entirely disabled.

      People log on, then sudo to their admin account which is a functional root, or they sudo directly to root in some cases.

      Sudo provides logging, and gives you the ability to delegate commands that can be run as root, even if a user doesn't get full root.

      I don't get the hate, just typical refusal to change, the old ways are better?

    6. Re:don't use sudo on production systems by Anonymous Coward · · Score: 0

      The same reasons that shared passwords are not permitted are reasons not to use sudo. It's entirely too easy for some typo to completely wipe out an entire cluster or even environment. Your log auditing isn't going to protect you, may even be wiped out too.

      It has happened. Fact that you say things like "just typical refusal to change, the old ways are better?" shows your ignorance.

    7. Re:don't use sudo on production systems by nullchar · · Score: 1

      Absolutely. Whether a workstation or server, this applies.

      No one should know the root password; but it should be stored somewhere accessible with some effort and oversight.

      If you allow remote access, via SSH or similar, you should never allow root. Always access a system with low privileges and escalate with authentication (pass,key,etc) and authorization (allowed to do X).

      Sudo can easily limit commands, and log them. "sudo su ..." should not be allowed either, with possible exception to either a single-user device or a limited administrator account that's not a regular login.

      Automate as much as possible.

    8. Re:don't use sudo on production systems by techno-vampire · · Score: 1

      No one should know the root password...

      And how do you prevent whoever installed the OS in the first place from using it, especially if the installation program won't let you install without setting it? And, it's my home computer, nobody else uses it so why shouldn't I know it? (Yes, I understand that you're talking about work computers, especially servers, but there are cases where having somebody know the root password isn't a problem.)

      --
      Good, inexpensive web hosting
    9. Re: don't use sudo on production systems by Anonymous Coward · · Score: 0

      Yeah, stop working already. The local security nutcase is whining about 1% cases again. Worry about the backups, leave the popduction of actual value to the non/lesser-autists please.

    10. Re:don't use sudo on production systems by pnutjam · · Score: 1

      How is that any different then fat fingering as root? Sudo doesn't cross clusters unless your pairing it with Ansible or something.

    11. Re:don't use sudo on production systems by jeremyp · · Score: 1

      Yes because the root shell has magical properties that stop you from making typos. Oh, no wait, it doesn't.

      I've seen people su to root and forget they are logged in a shoo and do things like "I'll just empty my home directory", type "cd" then "rm -rf * ". On Linux this is not such a disaster but on traditional unixes, root's home directory is /

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
    12. Re:don't use sudo on production systems by Wdomburg · · Score: 1

      If you give unrestricted sudo to someone who isn't careful, the problem is your policy, not the tool.

      And if you don't have a recovery plan for catastrophic mistakes or robust off-host logging, the problem is still with your policy, not the tools.

      (Of course a competent admin will still sometimes make horrible unfortunate mistakes. But they are no more likely to with "sudo" than with "su". If anything, they are less because they are only running specific targeted commands with escalated privileges.)

  29. There's fixes for this. by Anonymous Coward · · Score: 1

    Chroot into your damaged install, mount a devtmpfs and a /proc, maybe /sys,
    then, "for p in $(rpm -qa); do rpm --setperms $p; done"

    Works on rpm-based distros at least.

    If it's changing all the modes to 000 or something, do a "chmod -R 755 /etc" or something on whatever files are causing trouble, then run the above to restore them to the correct state.

    1. Re:There's fixes for this. by Etcetera · · Score: 1

      Chroot into your damaged install, mount a devtmpfs and a /proc, maybe /sys,
      then, "for p in $(rpm -qa); do rpm --setperms $p; done"

      Works on rpm-based distros at least.

      If it's changing all the modes to 000 or something, do a "chmod -R 755 /etc" or something on whatever files are causing trouble, then run the above to restore them to the correct state.

      Yeah, I was going to post something similar. Unfortunately, of course, you're still hosed on userland files and anything non-packaged. And the kind of people running bleeding edge npm are probably those who barely understand permissions to begin with.

      On any RHEL system that's the first place I'd start, then try to pick through the debris of what was left.

    2. Re:There's fixes for this. by Junta · · Score: 1

      If you are using something like npm, odds are the rpm databse is only a vaague hint of what a fraction of the system used to look like. That admin is already down the path of ignoring the OS packager, so expectation that it will repair completely is low.

      --
      XML is like violence. If it doesn't solve the problem, use more.
    3. Re:There's fixes for this. by pnutjam · · Score: 0

      And the kind of people running bleeding edge npm are probably those who barely understand permissions to begin with.

      chmod -R 777 /

  30. chown? by v1 · · Score: 1

    Users who installed this update -- mostly developers and software engineers -- will likely have to reinstall their system from scratch or restore from a previous system image.

    Maybe those "developers" and "engineers" need to learn how to fix their systems with the super-advanced CHOWN command, instead of reinstalling??

    --
    I work for the Department of Redundancy Department.
    1. Re:chown? by Anonymous Coward · · Score: 0

      Users who installed this update -- mostly developers and software engineers -- will likely have to reinstall their system from scratch or restore from a previous system image.

      Maybe those "developers" and "engineers" need to learn how to fix their systems with the super-advanced CHOWN command, instead of reinstalling??

      They don't teach these things at Upstairs JavaScript Full Stack Developer School.

    2. Re:chown? by Anonymous Coward · · Score: 0

      Sure, if you know what to chown/chmod everything to which is nowhere near as simple as running a few chown -R and chmod -R commands since different things in /etc require different permissions. So you are looking at having to either find or create a spare system to determine the correct permissions for everything, write them down or print them, and then change them as appropriate. Much easier to reinstall, either from backups or even from scratch.

  31. NPM - Noiseless Penguin Murderer by Anonymous Coward · · Score: 1

    ;-]

  32. Does it crash macOS too? by Anonymous Coward · · Score: 0

    Does it?

  33. Clearly malware by Anonymous Coward · · Score: 0

    Since NPM now bricks systems, it clearly falls into the category of malware/ransomware. I hope distributions treat it as such, and prevent installation thereof

  34. Permissions, abstractions by Tenebrousedge · · Score: 1

    Granted, but that's not necessarily a good argument. Standard Unix permissions provide a fairly limited set of abstractions. You have groups, users, and anyone; read, write, and execute; and a few other flags. It's concise, capable of expressing anything you like, and very efficient. One can say the same thing about assembly code. In both cases, having better abstractions is necessary, and the most important factor is the amount of time required by the various developers. And on that note, I must say that I have no idea whether either modern Linux or Windows has an advantage over the other, simply that the argument of "it doesn't come up often" isn't necessarily a good one.

    --
    Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
    1. Re:Permissions, abstractions by Anonymous Coward · · Score: 0

      That's like saying asm can't represent instructions the assembler doesn't know about, so we need to use a better abstraction, namely binary...
      ACLs aren't a better abstraction (and Windows permissions even less so), they are more powerful, but in every other aspect they are utter crap and a usability nightmare.
      If someone had a better abstraction, there'd be no need to keep the old user/group/other permission system really.

    2. Re:Permissions, abstractions by Tenebrousedge · · Score: 1

      ACLs aren't a better abstraction (and Windows permissions even less so), they are more powerful, but in every other aspect they are utter crap and a usability nightmare.

      Security and usability are always opposed. I have a Mark I brick which is extremely secure, although the user interface leaves something to be desired. Generally, end users shouldn't need to mess with permissions, so it's sufficient to be usable from the developer's point of view.

      If someone had a better abstraction, there'd be no need to keep the old user/group/other permission system really.

      Right. We'll just go update POSIX. That should be completely trivial.

      --
      Those who advocate genocide deserve every protection afforded by law, and none afforded by common human decency.
  35. Re:Impossible! by Anonymous Coward · · Score: 0

    I had a clever response to this, but then my computer had to reboot for updates, and I was waiting so long that I forgot what it was :(

  36. wonder who approved that pull request? by Anonymous Coward · · Score: 0

    who the hell approved the pull request after seeing code that changes permissions in the file system? "Oh hey, looks like you're changing permissions in system folders, forget testing, we're going straight to production with this"

  37. mtree(8) by MavEtJu · · Score: 3, Interesting

    NAME
              mtree -- map a directory hierarchy

    SYNOPSIS
              mtree [-LPUcdeinqruxw] [-f spec] [-f spec] [-K keywords] [-k keywords]
                          [-p path] [-s seed] [-X exclude-list]

    DESCRIPTION
              The mtree utility compares the file hierarchy rooted in the current
              directory against a specification read from the standard input. Mes-
              sages are written to the standard output for any files whose character-
              istics do not match the specifications, or which are missing from
              either the file hierarchy or the specification.

    --
    bash$ :(){ :|:&};:
  38. Why is root involved? by Philkeeg · · Score: 2
    1. Why is root involved? NPM can be installed and used without requiring root.
    2. The issue comes in to play because NPM makes packages available as commands in the system by by PATH. Perhaps they should change this and provide instructions on how to modify PATH to include the bin directory node creates when users install packages globally. At the least, it would have been half-way responsible to craft an installer that does all the setup work for users, requiring root once to run the script that adds PATH vars and install to a specific user.
    3. Glad I contained this beast in its own Docker when the need for it arises. I'll expand on this if anyone needs help setting this up and understanding how to containerize things like this (or PHP, fucking python, or any other crap-all-over-the-place RE/PM/etc.) in project tooling or single-use containers. Other tools can be containerized as well; I use docker for Chrome too, which is especially useful when each client gives me a google user for their org and an integrated SSO like Okta which requires a browser plugin.
    --
    Phil
    1. Re:Why is root involved? by nullchar · · Score: 1

      Agreed that NPM never needs root, just like Java never needs root. Install in /opt/npm.version (with symlink of /opt/npm => npm.version). Add /opt/npm/stuff to your $PATH and then you get whatever latest installed version, with an easy way to try different versions by altering the symlink.

      And of course, JS applications or your own developed applications, will stay inside containers for any NPM stuff. But global /opt/npm is handy for various command line tools.

      Can you run multiple dockerized chromiums in parallel? And they play nice with X? And can you copy/paste between host and container? Can you access via mount a restricted part of your host filesystem? Would chromium be better as a "snap" or self managed in docker?

      Thanks!

  39. Taken to the next level ... by Anonymous Coward · · Score: 0

    Someone already thought a few steps ahead ...

    https://hackernoon.com/im-harvesting-credit-card-numbers-and-passwords-from-your-site-here-s-how-9a8cb347c5b5

    This NPM insanity has to stop

  40. Does GoboLinux avoid this issue? by Anonymous Coward · · Score: 0

    I vaguely recalled a Linux distro where e, "each program gets its own directory tree". With a little searching, I found it:

    https://linux.slashdot.org/story/16/12/17/0655249/gobolinux-016-released-with-its-own-filesystem-virtualization-tool

    I don't have any experience with GoboLinux, but I thought I'd throw it out there in case anyone does and can chime in.

  41. Always requiring the latest version of everything by jrumney · · Score: 3, Informative

    This is why I always reject anything that has requirements that I install the latest version of everything and use a language specific package manager to manage dependencies. Javascript packages seem the worst for the "bleeding edge" requirement, but Java, PHP, Python, Ruby and even Perl have long had issues with requiring the language specific package manager to be used.

    If my distro maintainers have not packaged it and tested to the level that the rest of the OS gets tested, then it has no place on my server.

  42. Re: yum reinstall * and reedit any changes by han by Anonymous Coward · · Score: 0

    "profession"

  43. Re:windows has better group permissions and muilt by MikeBabcock · · Score: 1

    setfacl -m u:joe_dragon:rwx filename
    setfacl -m u:joe_nobody:rx filename

    --
    - Michael T. Babcock (Yes, I blog)
  44. Re:Wow! Just. Wow! by dhaen · · Score: 1

    Imagine if that had happened with Apple.

    Slashdot would have completely filled-up their Servers by now with the Hand-Wringing and Apple-Hating Diatribe.

    Think about it.

    Do you mean the acutely difficult: sudo diskutil repairPermissions /

  45. Not entirely Windows by Anonymous Coward · · Score: 0

    It's the kids whose grasp of linux is all about Ubuntu

  46. Root + installing right off the net. Brilliant. by Waccoon · · Score: 1

    This explains a lot. A couple weeks ago I was complaining about having to build a Javascript app written using Babel and NodeJS. The build was designed to automatically check for and download the latest version of all packages with NPM before building. After the inevitable swath of updates, things were so broken beyond repair that even re-installing all the packages didn't fix the build system. The only way I was able to get anything to build again was by resetting my VM image and reinstalling from scratch. Do the project developers seriously expect me to reinstall my OS every time they push out a project update? Given that this is a web app, updates happen pretty damn often!

    When it comes to the point where web developers are trying to do things as root, you know this shit has gotten totally out of hand.

  47. Why a script repo manager needs access /boot? by Anonymous Coward · · Score: 0

    This is more than horrible design, even etc is not for all programs or applications, they should use: "/home/$USER/.npm/etc".

  48. Accidents happen by Anonymous Coward · · Score: 0

    The update script for a custom application our company uses had been issuing the " rm -rf ./* " command, and a bug caused it once to issue it from the root directory... ouch.

    1. Re:Accidents happen by Anonymous Coward · · Score: 0

      Same guy here. Forgot to say that it ran as root...

  49. umm by Anonymous Coward · · Score: 0

    I demand value for money from all the free software I use.

  50. Not the first time... by Anonymous Coward · · Score: 0

    It's not the first time something like this happens, remember Bumblebee uninstall script running "rm -rf /usr"?

    https://github.com/MrMEEE/bumblebee-Old-and-abbandoned/issues/123

    Or when EVE Online deleted C:\boot.ini on Windows systems?

    https://www.eveonline.com/article/about-the-boot.ini-issue/

  51. Language-specific package managers by Anonymous Coward · · Score: 0

    Other language-specific package managers have their situation sorted-out. Take Perl on Debian, for example, where most of the Debian packaging derives well from the Perl package management.

    It's those "special snowflake" (aka antisocial) language environments which are always causing problems. I avoid those as much as I can.

  52. Re:Always requiring the latest version of everythi by thegarbz · · Score: 1

    This is why I always reject anything that has requirements that I install the latest version of everything

    Please send me through your IP address. I look forward to having another internet connected machine at my disposal.

  53. Far worse than the summary makes out by thegarbz · · Score: 1

    The first tweet in TFA really takes the cake:

    "“if I run sudo npm --help my filesystem [changes] ownership of directories such as /etc, /usr, /boot”"

    You don't even need to install or make a change to the system. Simply sudoing npm is enough to trigger the bug. Ironically those people who are ballsy enough to run everything as root are unaffected since this seems to be some iteration with sudo only.

    Epic fail. Wait are we still doing Epic fail or are we just saying "Sad!" ?

    1. Re:Far worse than the summary makes out by jrumney · · Score: 1

      Any tips for safely checking the version of npm installed? If npm --help screws things up, I expect npm --version probably isn't a good idea either. I guess something like strings $(which npm) | grep 5\.7 would be the best way to check if I'm compromised?

    2. Re:Far worse than the summary makes out by Anonymous Coward · · Score: 0

      Lazy way: try to reinstall from your package manager, it should show version information.

    3. Re:Far worse than the summary makes out by thegarbz · · Score: 1

      Two options:

      1) Don't sudo.
      2) su root. Then run npm --help.

      The problem only occurs if a normal users invokes npm via sudo.

  54. Something's wrong by Anonymous Coward · · Score: 0

    You know something is wrong when your language package management tool is allowed to modify core files in your system.

    But, wait a moment. Using a completely crappy unsafe language such as javascript to make server side programming is also worse than letting your development tools to mess up your fs.

  55. Feature by DrYak · · Score: 1

    For everyday use, BTRFS is actually pretty stable, and is used by default by openSUSE.
    (and used to be used by default by Jolla's Sailfish).

    Some specific *features* (mainly : RAID5/6) aren't considered stable yet.
    (But that's the case of even XFS: they working to add CoW and snapshotting too)

    But if you stick to default settings, it works perfectly.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:Feature by jeremyp · · Score: 1

      For everyday use, BTRFS is actually pretty stable

      I want better than "pretty stable" for my file system, I want stable. Pretty stable suggests not completely stable.

      --
      All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe
  56. Re:Always requiring the latest version of everythi by Anonymous Coward · · Score: 0

    At least his server works, unlike those with this NPM update.

  57. BTRFS: Default works perfectly by DrYak · · Score: 1

    How stable is btrfs?

    I use it as my everyday FS on laptop (default for openSUSE), on smartphones (default for Sailfish OS), and on a few servers I take care of.

    The default options work perfectly well nowadays. (CoW has been able to get me out of very tricky situation like hardware crashes)

    The thing that are considered still unstable are features that aren't enabled by default (namely: RAID5/6, there has been progress lately, but it's still not considered stable. Unlike ZFS's RAID-Z/Z2)

    The "paint yourself in a corner CoW madness" that typically plague young CoW/Log FS ("enosp" while trying to delete files) has disappeared long ago.

    Warning : another peculiarity of CoW /Log FS :
      - DO NOT RUN "fsck" EVER. It doesn't make sense to fsck, better use the features of CoW / Log to roll back to an older version
      (at least only use it as a desperate last resort, when all the CoW's / Log's feature have failed)
    (In BTRFS' case, that means first try to mount with "usebackuproot" (formely "recovery") option to use an older pre-corruption version, or use the "btrfs recovery" to read the files out of a corrupted filesystem/image. So basically by then you've already fixed your system before even reaching the point where you'd consider fsck. So don't run it.).

    I would still recommend :

      - big files that get tons of random write (e.g.: databases, virtual volumes, torrents), and that basically have their own integrity checking built-in (db's log journal, the checking/journaling of the filesystem inside the VM, etc.) can benefit if you mark then "not CoW" (chattr +C, usually done only on new files) to avoid excessive CoW fragmentation and redundance between CoW and their respective integrity checking.
    (I've read somewhere the ZFS can do this automatically detect such files for you. In BTRFS you need to manually tag these files with chattr)

      - running "btrfs scrub" periodically to check data integrity and use btrfs' built-in checksum to detect bit rot (big feature of ZFS/BTRFS compared to oldschools FS such as EXT4). (on openSUSE look for package "btrfs-maintenance" that can setup cronjobs for you)

      - running "btrfs balance" with filters like "-musage=60 -dusage=60" to tidy up allocated chunks that are more or less empty. It helps to avoid running out of allocatable chunks. (on openSUSE look for package "btrfs-maintenance" that can setup cronjobs for you, on sailfish "btrfs-balancer" can help automate this work and is used by the system updater to free allocatable chunks) (eventually it will be automated in the background by BTRFS).

      - running "fstrim" after above-mentioned balance so the SSD's firmware knows the freed chunks can now be claimed back as free erase blocks for wear-leveling purpose. (on openSUSE look for package "btrfs-maintenance" that can setup cronjobs for you)

    That's just my personal recommendations, it's not mandatory.

    And now the interesting parts :
      - openSUSE provides a tool called "snapper" that will automate taking snapshots with BTRFS
      - YaST interract with the above whenever you make an upgrade.
      - the GRUB script they provide can conveniently setup an "advanced" boot menu entry that propose to directly boot into an older snapshot, circumventing any damage done by a botched upgrade.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
    1. Re:BTRFS: Default works perfectly by Bengie · · Score: 1

      I'm glad BTRFS is still coming along. Having only ZFS is annoying for something that should be the norm. I do have some issues with BTRFS fundamentally. A simple example is "btrfs balance". It is fundamentally impossible to do this safely without having to re-write all of the data, which means it's literally impossible to do with a drive more than 50% full. The fact that BTRFS supports this means it is potentially silently corrupting your data at least during this operation. If BTRFS is claiming to be something, then not being that, I can't trust it. There are things that BTRFS do that are dangerous and they don't seem to make sure people are aware or they're not aware themselves.

  58. FYI v5 by Anonymous Coward · · Score: 0

    v5 was not an LTS, and it's also quite old. The latest LTS is v8 and before that v6. Not many people will be using v5 and no one should be using it in production.

  59. Re:windows has better group permissions and muilt by Anonymous Coward · · Score: 0

    Except for the 16 groups per user limit, of course.

  60. Re:Always requiring the latest version of everythi by thegarbz · · Score: 1

    Yes I can see that. Its a very good machine to have at my disposal.

  61. yarn by iTrawl · · Score: 1

    Drop npm. Use yarn. It has a lock file, it's quick, doesn't DoS the DNS until it decides to timeout, it doesn't take half an hour to install the packages in Gitlab CI, and it feels professional... Yarn is just lovely.

    --
    "Everybody's naked underneath" -- The Doctor
  62. Re:Always requiring the latest version of everythi by jrumney · · Score: 1

    You are conflating the latest version, which is generally unstable and full of potential zero days, with security patches, which distributions do a good job of backporting to the stable versions they are shipping when the ADHD developers of the upstream are too lazy to maintain anything other than git HEAD.

  63. Something is wrong with the summary. by Anonymous Coward · · Score: 0

    Something is wrong with the summary. It doesn't make any sense. /usr, /etc/, and /boot are all owned by root. Only root is allowed to add files or modify these directories. Changing the ownership would not change this, root is still allowed to do everything. It would be a security issue, but would not have any effect on booting or system stability.

  64. test by mevanchik1695 · · Score: 1

    this is why you always have a Stage or Test on ANY change, or at least a daily/weekly image so nobody should be complaining

  65. Use NVM by Hulfs · · Score: 1

    I only tangentially use node for development work, but once I saw people on message boards tossing around sudo commands to install stuff I immediately looked up how to avoid that. The solution is here: https://github.com/creationix/....

    Basically, it installs node and all node executables into an .nvm directory in your home dir and then modifies your path to point to those distinct version. It also allows you to utilize multiple different node versions across different projects through the use of project specific .nvmrc files.

    Using nvm would have avoided this bug, assuming you run as a non-privileged user...you do, right?

  66. Easy fix for me!!! by Anonymous Coward · · Score: 0

    for i in etc usr boot
    do
            cd $i
            sudo git revert HEAD
    done

  67. Re:Always requiring the latest version of everythi by thegarbz · · Score: 1

    You are conflating the latest version, which is generally unstable and full of potential zero days, with security patches,

    And with 99% of software on the market they are one and the same and therefore should be conflated.

  68. Re:windows has better group permissions and muilt by Anonymous Coward · · Score: 0

    Except for the 16 groups per user limit, of course.

    If you've been asleep in a cave for a couple of decades.

    Current Linux limit is 65535. Previous limit was 32 for kernel version earlier than 2.6.3

  69. If you reinstall because of fucked permissions... by Anonymous Coward · · Score: 0

    ...you probably should not use linux.

  70. CoW is not at the chunk level. by DrYak · · Score: 1

    A simple example is "btrfs balance". It is fundamentally impossible to do this safely without having to re-write all of the data, which means it's literally impossible to do with a drive more than 50% full.

    Huh, no.

    A "balance" is not literally rewriting a new copy of the whole drive in one single atomic step.

    Even the large scale "rewrite everything" rebalancing usually works one allocation chunk at a time. So even that one is possible to do, as long as you have at least one free chunk.

    The "usage" filters let you usually try to free allocation chunks by taking the least full chunk and appending it's content on allocation chunks that still have free room (that's what "-dusage=0" does).
    that enables you to balance when you con't even have a single allocation chunk free, and only have free-space equivalent to an allocation chunk spread all-over the remaining non-full chunks.
    That's how you can get yourself out of "stuck with enosp errors" situation. (That's also how opensuse's btrfs-maintenance and sailfish os' btrfs-balancer begin their work, and only then start increasing "usage" in steps).

    Also all the data that is represented inside those allocation chunks is handled in a CoW fashion :
      - new copy of the data is written over some new free space inisde the new allocation chunk
      - pointers are updated
      - the data from the old allocation chunk is marked as "free"
      - repeat enough of the above and the whole old chunk is emptied and available again for chunk allocations (and can be signaled to be free through "fstrim" so the firmware on the SSD knows that it can claim back the erase-blocks that it allocated to that logical block address)

    Basically, there isn't much difference between a normal (partial over-) write operation and a balance, except that :
      - in case of balance, the newly written extents of data have the same content as the original extents of data.
      - as you're sequentially running through all (or the part that is considered by the filters) data, the new data extents will be all stored nice and tidy in their new allocation chunks instead of being sparsely spread all-over the place, due to extents in between having been freed and/or moved around.
      - an indirect result of the above : the free space gets "de-fragmented" and new space is available to be allocated for upcoming chunks.

    There's no point in time in this procedure where you can't retrieve coherent data.
    A BTRFS balance interrupted by a reboot/hardware crash/whatever) can simply resume where it left of at the next boot.
    (and usually does this automatically).

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]
  71. Feature-dependent by DrYak · · Score: 1

    I want better than "pretty stable" for my file system, I want stable. Pretty stable suggests not completely stable.

    If you want "stable" - you only stick to the recommended features that are marked as stable.
    Sorry if I wasn't clear.

    The rest works well enough to be used in production by multiple companies (Facebook, SUSE, etc.)

    As a non omniscient-being, I can't vouch that there will never be some weird bug hidden in the darkness that will suddenly jump at you when you hit that weird corner xase that nobody has though about ever. But that's valid for any other part of the Linux kernel and any other piece of software in general.
    But enough people are pouring resources in and using it in the real world to keep the probability of such an event occurring extremely low, to the point that it seems acceptable to me.

    --
    "Sufficiently advanced satire is indistinguishable from reality." - [Tips: 1DrYakQDKCQ6y52z6QbnkxHXAocMZJE61o ]