You are not logged in.

#1 2020-07-22 19:30:53

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

How to fix system-wide permissions? [SOLVED]

Hello,

Due to a failed hard drive, I had to restore a system from backup, but for some reason the permissions weren't preserved in my backup drive (uid=1000,gid=1000 for all files in the filesystem).  How can I rebuild the file permissions using the mtree? 

I've tried the AUR package pacman-fix-permissions, but it fails with the error "can't open or download 'acl' package".

edit: there also used to be a shell script on xgit but the url is dead

Last edited by kev717 (2020-07-23 16:30:44)


If I code something, it's probably at https://github.com/kellcodes

Do **NOT** expect a response from me.

Offline

#2 2020-07-23 01:46:36

jonno2002
Member
Registered: 2016-11-21
Posts: 684

Re: How to fix system-wide permissions? [SOLVED]

this happened to me once too, from memory i just re-installed ALL packages on my system which reset the permissions, this had to be done with arch-chroot from a working installation. i cant remember how usable the system was after but its worth a try anyway.

Offline

#3 2020-07-23 11:08:03

kev717
Member
Registered: 2011-06-08
Posts: 67
Website

Re: How to fix system-wide permissions? [SOLVED]

Reinstalling the packages didn't work.  The issue is primarily with the config files, although it does set the correct permissions on everything in /usr; as a note, I was able to reinstall everything without a chroot, but had to go in the order of installing utils-linux and some other base packages before installing the rest. 

If I run `pacman -Qkk`, it still shows thousands of permissions issues but doesn't tell me what the expected permissions are.  If it at least told me the expected permissions, then I could pipe it into a python script similar to pacman-fix-permissions and just have it automatically fix everything. 

Is there an option to have pacman print the expected permissions on these mismatched files?

EDIT:

`paccheck --file-properties --quiet | grep permission` ; I should be able to write a bash script for that easily.

Last edited by kev717 (2020-07-23 11:15:42)


If I code something, it's probably at https://github.com/kellcodes

Do **NOT** expect a response from me.

Offline

Board footer

Powered by FluxBB