[Solved] Warning: directory permissions differ sudoers.d

While updating one of my machines I saw these two warnings

warning: directory permissions differ on /etc/sudoers.d/ filesystem: 755 package 750
warning: directory permissions differ on /var/lib/AccountService/icons/ filesystem: 755 package 775

After doing some reading I’m not sure If I should just type in commands without knowing the result as if it may break something.

There are alot of errors in my logs so I’m hoping to eliminate them by fixing these warnings or other things I may find

There may be other warnings from a previous updates on multiple machines.
What I’d like to do is fix these, clear the logs and reboot and search for errors/warnings and do this on all my machines.

I would definitely fix that first one. Your sudoers.d directory is world readable.

This removes all permissions for “other” but leaves group and owner permissions untouched. It does it for the directory and anything inside it, which should be what you want in this case.

sudo chmod -R o-rwx /etc/sudoers.d

The second one seems like less of an issue to me. The only difference is that the package has the directory writable by the “group”. You could safely change it with:

sudo chmod g+w /var/lib/AccountService/icons

I would always recommend altering permissions with symbolic notation instead of octal notation. It is a lot safer since you can only set what you want and it is easier to see what it is doing.

For example, the o-rwx above means remove read, write and execute from other

3 Likes

I’ll call it solved for now, but the second one gave me

$ sudo chmod g+w /var/lib/AccountService/icons
chmod: cannot access ‘/var/lib/AccountService/icons’: No such file or directory

I’m guessing that’s why it’s complaining.

Are there any good gui tools for system maintenance and log viewing?
Thankyou as well

/var/lib/AccountsService/icons :wink:

1 Like

You’d think I would have double checked spelling, but I didn’t, thankyou, it worked this time

1 Like