r00ty

joined 2 years ago
[–] r00ty@kbin.life 1 points 9 months ago (3 children)

OK so it's fairly simple. You need to install the acl package (or whatever equivalent package contains getfacl/setfacl. Then you can use that to dump the data from an entire structure into a file (I also then bzip that). Then I backup all installed packages to help with a restore too.

So the script looks like:

#!/bin/bash
cd /etc
/usr/bin/getfacl -R . | /usr/bin/bzip2 -9 >PERMISSION_BACKUP.bz2
chmod 600 PERMISSION_BACKUP.bz2
cd /home
/usr/bin/getfacl -R . | /usr/bin/bzip2 -9 >PERMISSION_BACKUP.bz2
chmod 600 PERMISSION_BACKUP.bz2
cd /root
/usr/bin/getfacl -R . | /usr/bin/bzip2 -9 >PERMISSION_BACKUP.bz2
chmod 600 PERMISSION_BACKUP.bz2
cd /var
/usr/bin/getfacl -R . | /usr/bin/bzip2 -9 >PERMISSION_BACKUP.bz2
chmod 600 PERMISSION_BACKUP.bz2
/usr/bin/apt list --installed | /usr/bin/bzip2 -9 >/root/INSTALLED-PACKAGES.bz2
chmod 600 /root/INSTALLED-PACKAGES.bz2

To restore you change to the folder the backup was taken from, unbzip the file (or uncompress live via pipe) and use setfacl --restore=

[–] r00ty@kbin.life 2 points 9 months ago

Yeah. Only on my phone right now but will get it and post here later/tomorrow.

[–] r00ty@kbin.life 3 points 9 months ago (6 children)

I mean, too late for you now. But I have a script that backs up just the permissions and owners for a given folder hierarchy.

I use it because I backup to a cloud backup platform that doesn't save them. So these files are backed up with the data so the files and permissions/owners can be restored in an emergency.

But you could of course also use the file to restore permissions after a user generated mistake too.

[–] r00ty@kbin.life 60 points 9 months ago (3 children)

Pretty sure one of the first things musk did was kill off an entire (or more than one?) data centre. Pointing out with glee that it worked fine without it.

This is probably why it existed.

Still it's only twitter. No real loss.

[–] r00ty@kbin.life 40 points 9 months ago (4 children)

I generally reject all. Then check for those sneaky sites that keep "legitimate interest" cookies ticked. I really doubt their idea of legitimate and my idea of legitimate align in any way.

[–] r00ty@kbin.life 14 points 9 months ago
[–] r00ty@kbin.life 4 points 9 months ago (1 children)

Yeah I think allowing a write in answer is too risky. You will end up with 12 unique text answers otherwise.

I do like the idea of the equivalent of an open verdict. Which is probably a mix of options 1 and 3 from your list. If you don't believe either of the provided options are suitable and you don't want to skip then this option would be a nice thing.

[–] r00ty@kbin.life 49 points 9 months ago (8 children)

Needs a skip option for questions you're really not comfortable giving a reply to (I maybe missed it if there). I hit one I really did feel was far too subjective to give a reply to that might even potentially be taken seriously.

Otherwise a nice idea.

[–] r00ty@kbin.life 3 points 10 months ago

Can Linux run programs that rely on frameworks like .NET or other Windows-specific libraries?

So this one I thought I'd answer because I've done development in both NET framework and NET core and how it works is different for each (although things will usually work one way or another).

For .NET framework applications, if the program is compiled for windows (the .exe) you can usually run it with mono (you generally don't need wine, but there's some caveats that mean sometimes you should use wine). This will include programs with GUIs. If the NET framework app calls other windows programs it is best to run it via wine, you will need to install the net framework within wine, but there's a winetricks command for that. There are a few things that are generally niche things that do not work in linux net framework's mono though. By niche the one I can think of, is serial port events. Very annoyingly they all exist, so the program will run but the events will never trigger an action in the programs. Very annoying, but luckily very rare/niche stuff.

For .NET core, you can build directly to linux targets, and if the project you are working on does target NET core, then you can run the binary natively (note: you usually cannot build applications using forms to linux native binaries, for these you should run the windows exe with wine). You can also run the .exe files for this with wine and I've rarely had a problem with it.

Note that if you develop .NET applications, you won't be able to build anything that uses the standard forms GUI under linux. There are other UI frameworks out there you can use that are multi platform. For this reason, for the projects that do use windows forms, I have a VM with windows on that I boot up for this reason.

In short, if you're just running windows binaries, you will be generally fine with mono for framework and wine for core. For development "it's complicated".

[–] r00ty@kbin.life 14 points 10 months ago (2 children)

Well, you might be able to do it. But you might not want to be holding it in YOUR hand when you turn it on. :P

[–] r00ty@kbin.life 19 points 10 months ago

The problem is, this assumes that even if the kind of AI creators that are scraping relentlessly (and there's a fair few that do) took this data source directly, that they'd then put an exception in their scrapers to avoid wikipedia's site. I doubt they would bother.

[–] r00ty@kbin.life 9 points 11 months ago

I used my own content controls to block reddit for a year. Well, a bit longer so far.

view more: ‹ prev next ›