• axEl7fB5@lemmy.cafe
    link
    fedilink
    English
    arrow-up
    3
    arrow-down
    1
    ·
    4 hours ago

    idk tf chown does, use sudo instead. im not going to read man chown either.

    sudo su
    # do shenanigans in the cli/tui. gui is for noobs
    # nvim, ls, touch, stroke, tease, rm
    
    • Eyedust@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      2
      ·
      3 hours ago

      So I’m not the best at this, but this is my best guess (I have no experience in sysadmin, as I’ve only ever been the sole user of my PC and prefer not to network anything).

      Owner #1, smackyboi, has ownership of a file called smutgame.AppImage. This means they can choose who accesses smutgame, if it can execute, if it can be read or written by certain groups, etc.

      Owner #2, luvurealgood, on the system via their own account (or networked computer in the case of server storage) can’t change these settings unless smackyboi says they could, because they’re the owner and can add luvurealgood to the admin group for the file if they want. Smackyboi suddenly writes, sudo chown luvurealgood smutgame.AppImage.

      Now luvurealgood owns that file and can make every change they want to it, including removing smackyboi from accessing it, as they’re no longer the owner. They can lock down the file and forbid it from being executed, etc etc. I believe anyone who is in the admin group of that file can do anything to it as well, except change it’s ownership if its already owned.

      This is just from pieces of info and my tiny experience in Windows sysadmin shenanigans. Someone swoop in and correct me if I got anything wrong.

  • AdrianTheFrog@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    edit-2
    20 hours ago

    Is there a technical reason that Linux apps can’t/don’t just pop up an authenticator thing asking for more privileges like Windows apps can do? Why does nano just say that the file is unwriteable instead of letting me increase the privileges?

    • YTG123@sopuli.xyz
      link
      fedilink
      arrow-up
      1
      ·
      1 hour ago

      The GUI apps do (depends on your DE). Terminal apps like nano are designed to work without fancy desktop stuff, like Polkit. Any sort of graphical text editor should prompt you for your password.

      systemctl still asks for a password, though. Because it’s systemd, and it’s part of everything.

    • black0ut@pawb.social
      link
      fedilink
      arrow-up
      1
      arrow-down
      1
      ·
      2 hours ago

      Linux apps follow simplicity principles. If you don’t have permission to delete a file, why assume you may know the password of the user who has permission?

      You can preface sudo to any command to execute it with root privileges, which would be similar to running as admin in windows.

      Graphical apps do tend to ask for authentication if it makes sense. No userland apps should need more permissions than the current user’s in order to run.

    • Mohamed@lemmy.ca
      link
      fedilink
      arrow-up
      10
      ·
      20 hours ago

      Some do. I’m sure it is possible with terminal programs. In KDE, you do get authenticator pop-ups.

      • AdrianTheFrog@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        1 hour ago

        Hmm I just tried editing some systemd service with Kate and it did actually give me an authenticator popup when I tried to save it

        Although then the prompt expired and now it does nothing when I try to save it. Restarted Kate and now it works again…

        I haven’t tried that before

        When I try to go into the sudoers.d folder tho it just says I can’t, and the same thing happens when I try to open the sudoers file in Kate. If I try to copy and paste a systemd service in dolphin tho it just says I don’t have permission and doesn’t give a prompt.

        lol if I open it with nano through sudo it says ‘sudoers is meant to be read only’

      • dubyakay@lemmy.ca
        link
        fedilink
        arrow-up
        4
        ·
        17 hours ago

        With arch+xfce4 I mostly don’t. Except for when I do systemctl reload <service> in a cli without sudo and it pops a surprise elevation password request gui in my face. I haven’t figured out what makes it behave like that.

        I use Arch btw 👉🧐 eats booger

        • AdrianTheFrog@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          1 hour ago

          Yeah, when I was on xfce on Arch I remember going into some places in the file manager where it wouldn’t let me edit files etc without running it from the terminal through sudo.

        • m0stlyharmless@lemmy.zip
          link
          fedilink
          arrow-up
          2
          ·
          edit-2
          2 hours ago

          That’s the result of polkit (policy kit) authentication agents. These are typically DE-specific for their GUIs.

          pkexec is comparable to sudo and can be used from the terminal to get the graphical prompt for elevated commands.

    • blockheadjt@sh.itjust.works
      link
      fedilink
      arrow-up
      1
      ·
      18 hours ago

      Iirc there are ways to format your command to get it to do this. So whatever app you’re using just chose to format its command the simpler way.

    • Shardikprime@lemmy.world
      link
      fedilink
      arrow-up
      5
      arrow-down
      11
      ·
      22 hours ago

      I don’t know what’s the hate with edge, it works wonderfully for an average user, it’s fully configurable with add-ons and handles security policies really well

      The AI integration might be a bit over the top but nothing you can’t disable in your side

      Really I don’t see why you guys pile on so much on it

      • Vari@lemm.ee
        link
        fedilink
        English
        arrow-up
        3
        ·
        3 hours ago

        Because it’s my fucking computer and I shouldn’t have to edit the registry to uninstall a program I don’t use.

        After every update it’s also reset to my default browser which is infuriating

      • Lemminary@lemmy.world
        link
        fedilink
        arrow-up
        13
        ·
        edit-2
        21 hours ago

        Microsoft’s monopoly and their for-profit anti-consumer practices is what’s wrong with it. Their history says they cannot be trusted. I’d ask myself why they need a browser in the first place.

        • RaccoonBall@lemm.ee
          cake
          link
          fedilink
          arrow-up
          1
          ·
          2 hours ago

          Yup. As someone who lived through the internet explorer dark ages, I’m not eager for google and or Microsoft to have complete dominance

      • shalafi@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        21 hours ago

        Edge is a fine browser. I use it when Firefox isn’t working for a particular reason.

  • GreenKnight23@lemmy.world
    link
    fedilink
    arrow-up
    18
    ·
    1 day ago

    had a friend that was having problems with his PC and windows kept bitching about he didn’t have permissions. he ripped out the harddrive with it still powered on and threw it off his balcony into the lake screaming, “I fucking own you!”

    epic moment in my life to witness such an event.

  • Passerby6497@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    1 day ago

    My work laptop had a pop-up from an application that basically said “we couldn’t restart last time, so you e got 15 minutes until we reboot your computer” with no way to cancel or prevent the reboot.

    Me: the fuck you are

    * proceeds to kill the service and process from admin command line*

    Get fucked fortinet, I’ll reboot when I’m gods damned ready

  • GetOffMyLan@programming.dev
    link
    fedilink
    arrow-up
    36
    arrow-down
    1
    ·
    1 day ago

    If you’re on windows this means you don’t own the file. Go to properties security and take ownership.

    The default windows configuration is aimed at old people who will call tech support when they fuck up their PC.

    You can take ownership of pretty much the entire filesystem.

    Windows is actually hugely customizable people just don’t.

    • redjard@lemmy.dbzer0.com
      link
      fedilink
      arrow-up
      4
      ·
      23 hours ago

      In the basic case you go to settings and change permissions.

      In the more typical case for os modifications, you go to that tab, open advanced properties, change the owner account by typing in “everyone” or your account name by hand, saving, closing reopening the advanced security settings, probably disable inheritance then create a new permission entry.

      In the most extreme case, where you change files belonging to something critical like windows defender or edge, you can’t.
      The only way I am aware of is booting into an older windows install iso, or a live linux iso, then performing the modifications there.

      Disclaimer: I have not done this on windows 11 yet, but I can’t imagine the process got simplified.

      Windows has a lot of systems that allow some more complicated modifications. Those are often unnecessarily obfuscated, the registry for example doesn’t have to be a weird custom database, it could have been part of the filesystem or at least a more standard database format. Windows will sometimes bite you with weird sketchy systems breaking expectations, and this tends to become inevitable when you try to change stuff Microsoft has decided to remove consumer choice on.
      If Edge and the account push were as easy to avoid as learning how to take basic file ownership, we might not be where we are now (i.e. on Linux).

    • wizardbeard@lemmy.dbzer0.com
      link
      fedilink
      English
      arrow-up
      23
      arrow-down
      5
      ·
      1 day ago

      Glad to see another voice of sanity regarding Windows.

      If you haven’t learned by now, on Lemmy the only valid option for dealing with Windows configuration and basic Windows admin tasks is to yeet Windows and go to Linux.

      • RaccoonBall@lemm.ee
        cake
        link
        fedilink
        arrow-up
        2
        ·
        2 hours ago

        Sometimes one wants to access a file without making changes though. Escalating privileges is the answer in this scenario and windows doesn’t make that as easy,as it doesn’t really want to you act as SYSTEM

        • wizardbeard@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          1
          ·
          35 minutes ago

          100% true, and a great counterpoint.

          Copium/denial

          That’s well beyond even power user (imo) and into the forensic analysis realm though, where you should probably be using dedicated tools. I’m pretty sure there are still ways around this, ways to back up and restore the ACLs, but I haven’t ran into a need to not touch the modified timestamp in the decade or so I’ve been doing tech work professionally nor in the decade before as simply a young enthusiast. There’s still ways around that timestamp too, and arguments to be made that adjusting the ACL is touching metadata rather than the file itself.

          I do what I can to stay out of ACLs at my workplace.

          Windows ACLs are far more complicated than they have any right to be, and file perms are generally far simpler on Linux.

        • wizardbeard@lemmy.dbzer0.com
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          2
          ·
          edit-2
          18 hours ago

          I work in this space profressionally. Systems administrarion, architecture, design, and integration. Please take your single sentence “hot takes” elsewhere.

          Windows is far from “a shitty product” or “broken”. It is developed by horrid anti-consumer motherfuckers out to extract as much profit as possible from their least profitable user base: home users. Evil as hell, sure, but so is nearly every large corporation that makes shit that fills your personal hovel you call home. If that makes them untouchable for you, that is a great choice. But that does not factually impact the usability or usefulness of the product.

          Linux is awesome and necessary. Open source is the only way this whole mess keeps working far into the future, and I am no stranger to compiling shit from source and submitting pull requests.

          My problems with the Linux community, specifically on Lemmy, are these: Linux is not “just easier” and depressingly still not ready for the average consumer unwilling to tinker. The overwhelming majority of complaints about Windows so frequently posted here are solved problems that people pretend are entirely unfixable, or refuse to learn how to fix. For many people venting about their computer, it would be easier to direct them how to fix what they have rather than try to use it as an opportunity to push your religion OS of choice.

          If you can manage Linux, I promise that “fixing” a Windows install is well within your reach. Plenty of problems with it, but “broken”? “Unusable”? Take a look outside at the majority of the world, or even the fucking Steam user statistics and get back to me on that. More than good enough for the overwhelming majority.

          • rockettaco37@lemmy.world
            link
            fedilink
            English
            arrow-up
            2
            arrow-down
            2
            ·
            18 hours ago

            Oh jeez… you’re right. Sorry for expressing a view you disagree with. I feel firmly told off now.

      • Rhaedas@fedia.io
        link
        fedilink
        arrow-up
        7
        arrow-down
        2
        ·
        1 day ago

        That isn’t the reason to yeet Windows. If you were talking years ago about 7 or XP, things were different. 10 is not that great comparably, and 11 is a mess. But keep your Windows, if it’s what works for you. Until it doesn’t.

        Dual boot for the best of both worlds (although I’m finding myself more and more on the Linux side because it’s better for me.)

        • Honytawk@lemmy.zip
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          11
          ·
          1 day ago

          Even Windows 11 still has all the options Windows 7 had, and plenty more. Stop swallowing the Linux propaganda.

          • BluescreenOfDeath@lemmy.world
            link
            fedilink
            English
            arrow-up
            8
            arrow-down
            1
            ·
            1 day ago

            It’s the constant war on end users that chased me away from windows.

            You can’t say no to their relentless advertising. It’s “maybe later”. The pushing to require a Microsoft account. Ads in the start menu. Windows Recall.

            The list goes on. You get as much agency as Microsoft allows, or you violate your eula and modify the os to remove things you don’t want.

            We didn’t know it at the time, but windows 7 was peak windows.

            • wizardbeard@lemmy.dbzer0.com
              link
              fedilink
              English
              arrow-up
              2
              ·
              edit-2
              11 hours ago

              100% valid choice. I’d argue that it’s even the correct one.

              That said, those specific examples are all “solved”. My issue is that the overwhelming amount of Linux pushers here tend to act as though those issues are literally unsolvable.

              The ads are nearly all controlled from a single yes/no switch a single level deep into the settings menu. And that switch has not been reset by updates in at least four years. Since I’ve joined lemmy, every single “Microsoft is pushing more ads into Windows” article I’ve seen has been talking about ads controlled by this same singular switch.

              Things like the pushing of the Microsoft account and Recall are mostly avoided by using their Professional SKU/License/OS version and using GPO to disable those features. Or to take specific steps during install. You have to use the tools they have for corporate customers that have specific legal guidelines that prevent them from being able to use whatever MS’s new revenue extraction trick is.

              Bullshit? Yes. Should anyone have to do this shit to have a decent OS? No.

              But if you’re savvy enough to navigate Linux, you’re more than capable of navigating this shit on Windows. It’s not impossible.

          • Rhaedas@fedia.io
            link
            fedilink
            arrow-up
            8
            arrow-down
            2
            ·
            1 day ago

            It’s not propaganda if anyone can try things out for themselves, and even use them both if they want. Stop trying to keep your MS stock high.

          • Sanctus@lemmy.world
            link
            fedilink
            English
            arrow-up
            3
            arrow-down
            1
            ·
            1 day ago

            I just riced my work computer, let me fucken tell ya about tricking out a windows machine: its fucking embarrassing. Not that its fundamentally different than customizing Linux, for both you download apps (or packages). But its a clumsy ass mess on windows that has to overlay the existing shit, on Linux the only shit that exists is what I want. I dont have to deal with an onery built in taskbar, or trick a built in window manager to be tiling. The one I pick does what I want.

    • Honytawk@lemmy.zip
      link
      fedilink
      English
      arrow-up
      12
      ·
      1 day ago

      You needed permission from the SYSTEM or TrustedInstaller account.

      Which you can give to yourself if you are admin.

      • Jankatarch@lemmy.world
        link
        fedilink
        arrow-up
        3
        ·
        edit-2
        1 day ago

        Last time I did that it didn’t work so I figured I will restart and it will recognize then. Windows got a 30 minute update.

        When I logged back in my account was gone and still asked for a password. My old password didn’t work.

        Recovery option also fucked my grub. (Probably just the EFI now that I think about it.)

        • naticus@lemmy.world
          link
          fedilink
          English
          arrow-up
          7
          ·
          1 day ago

          That last bit about GRUB is why I never put Windows on the same drive as my Arch, btw install. If they both have their own EFI partitions, Windows doesn’t mess with Linux.

    • Cornelius_Wangenheim@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      1 day ago

      Just because you have admin rights doesn’t mean the process you’ve invoked does. Unless you specifically elevate it or the process asks to elevate, it’ll run unprivileged.

    • b000rg@midwest.social
      link
      fedilink
      English
      arrow-up
      3
      ·
      23 hours ago

      Can you delete Xbox games installed by another administrator? I ran into that problem a few years ago because I reinstalled W10 and had it keep “personal files” which apparently included my Xbox games. I couldn’t touch them at all, but I had W10 Home. I wonder if my problem could’ve been mitigated more easily than a full wipe of the drive? 🤔

      • 🇰 🌀 🇱 🇦 🇳 🇦 🇰 🇮 @pawb.social
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        23 hours ago

        I’m pretty sure I can. It just takes a little more effort actually going into the permissions tab of the files because Windows doesn’t have an equivalent to CHMOD AFAIK.

        Though, I am pretty sure you can do those basic permission options without Pro or Enterprise. You just need to be on an administrator account. Other things, like messing with actual system files, requires the Group Policy Editor.

        • dubyakay@lemmy.ca
          link
          fedilink
          arrow-up
          1
          ·
          17 hours ago

          Windows has icacls and Get/Set-Acl for permissions. You can also manipulate ownership, although it’s quite convoluted. Just doing takeown is the easiest.

          I’m conflicted on linux vs windows in this regard. I liked ACLs in Windows, but if a software/installer decided to mess it up, it was messed up good, and required lots of manual intervention.

        • floquant@lemmy.dbzer0.com
          link
          fedilink
          arrow-up
          1
          ·
          23 hours ago

          On any Windows system based on the NT kernel (XP+), there’s an additional access level above “Administrator”: NT Authority\SYSTEM. Some malware can make files hidden or write protected even to Administrator, and afaik there isn’t a legitimate way to obtain that authority