You are not logged in.

#26 2015-02-03 05:34:38

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,540
Website

Re: warning: directory ownership differs on /etc/

TheSaint wrote:

Am I doing right ? if I do

sudo find /usr/ -user <user_name> -exec sudo chown -v root:root {} ';'

In my case I found almost all packages weren't  set with correct permissions.

That will end bad...

Offline

#27 2015-02-03 05:39:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,540
Website

Re: warning: directory ownership differs on /etc/

krabat wrote:

@Allan
Thanks for clarifying.

There's just one more tiny detail bothering me a little bit:
As the problem doesn't seem to exist with colord I took a look at its PKBUILD and found package() invoking chown. The messages ceased with Postfix as well after adjusting PKGBUILD accordingly

package_postfix() {
        [...]
        chown 73:0   var/lib/postfix
        chown 73:0   var/spool/postfix/*
        chown 73:75  var/spool/postfix/{maildrop,public}
        chown 0:0    var/spool/postfix/pid
}

So wouldn't chown commands like this be an option to fix the problem in general, too?

Not in general, but for any software that reserves a group/user number.   Some packages create dynamically numbers groups/users.

Offline

#28 2015-02-03 11:51:19

TheSaint
Member
From: my computer
Registered: 2007-08-19
Posts: 1,535

Re: warning: directory ownership differs on /etc/

I fixed the directories manually. Now it seems no more problems.
I don't understand what changed the ownership.


do it good first, it will be faster than do it twice the saint wink

Offline

#29 2015-02-04 00:55:03

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,167

Re: warning: directory ownership differs on /etc/

ball wrote:
cfr wrote:

Is there an easier way of figuring out what the permissions or ownership should be? Which doesn't involve unpacking the package archive someplace and looking?

Yes. As krabat said, just reinstall the offending packages you've identified with pacman -Qkk. Upon reinstalling the correct permissions should be given.

I was specifically asking about cases in which that did not seem to be the case.

I changed the permissions of /etc/shadow and /etc/gshadow to match those in the package. pacman does not complain either before or after the change, though pacman -Qkk does.

I'm no longer sure I was right to change them, either. My fedora box also has ---------.

So I changed them back. pacman still doesn't complain if I reinstall the package - only with -Qkk. [That is, it complains about ownership of and permissions of directories. But those are all expected.]

Last edited by cfr (2015-02-04 00:58:56)


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#30 2015-02-04 01:01:15

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: warning: directory ownership differs on /etc/

pacman does not check permissions or ownership for files when installing packages, only directories.

Offline

#31 2015-02-04 01:05:01

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,167

Re: warning: directory ownership differs on /etc/

apg wrote:

pacman does not check permissions or ownership for files when installing packages, only directories.

Thanks for confirming that. So is pacman -Qkk correct? Should the permissions on shadow and gshadow be 600 rather than 000?


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

Board footer

Powered by FluxBB