You are not logged in.
Pages: 1
Hello guys,
a few updates ago i got this error message:
warning: directory permissions differ on /usr/share/hplip/base/pexpect/__pycache__/ filesystem: 777 package: 755probably i could just change that specific directory to 755 manually. but i ask myself, if i could just check my entire system for some "wrong" chmod-settings and maybe i could just reset everything to default.
is that possible?
Last edited by Asbestbrezel (2022-08-03 18:30:36)
Offline
You can check with (variations of) `pacman -Qk`. But that message clearly calls it a "warning" it's not an "error" - there's nothing to be fixed.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
that is a question that goes around in mind since i started using Linux. What is the right permission for every file. If i search for 777 files i find a lot, not only in home directory. But how can i know, that this is the correct?
I am not so into internet security and hacking stuff, but i guess if i change for example /etc/systemd/* to 777 it could open my system to hackers?
So it should be possible to check the system, if permissions are allright, shouldn't it?
Offline
What is the right permission for every file.
The one you need, this is borderline subjective and relates to questions about the owner of the file and whether you want it to be executable etc.
if i change for example /etc/systemd/* to 777
then you don't understand what you're doing. Why would you make any file in /etc executable?
Also
it cwould open my system to hackers
if you give anybody writing access to /etc/systemd/system, yes.
So it should be possible to check the system, if permissions are allright, shouldn't it?
Start w/ the one in the OP
warning: directory permissions differ on /usr/share/hplip/base/pexpect/__pycache__/ filesystem: 777 package: 755What does that mean, what are the implications and what might have caused this?
Yes, the problem is defining "allright".
As Trilby pointed out "pacman -Qkk" will allow you to check the permissions of the files controlled by the package manager against their supposed condition.
You then have to estimate whether deviations are desired/necessary/sensible.
For all other files, "find" allows you to search by ownership and permissions, but you'll have to look for suspicious files (eg. not root owned or world writable files in /etc) and make the same estimation about what that means.
Online
What is the right permission for every file. If i search for 777 files i find a lot ...
Well that's completely different from your initial question which was a warning about a directory. Permissions of 0777 on a directory is not that odd or concerning, but on a file it could be a very different story. You say you have found "a lot" of these... what are they?
EDIT: as indicated below, 0777 is typical of symlinks, but otherwise should not likely be used for any actual files.
Last edited by Trilby (2022-08-04 13:22:36)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Could all those files with 777 be symlinks?
Offline
yes, i guess, a lot my findings are directories or links.
i mean, i never changed the permission of system files or other root-owned files. but i thought, after i got that warning, that it could be a good idea, to ask if it is possible to check the entire system for possible wrong chmod-settings.
but, i guess, everything is allright. thank you guys for helping!
Last edited by Asbestbrezel (2022-08-04 20:21:37)
Offline
It is possible, and it's a worthwhile thing to check if there is any suspicion. The method to do so was in my initial reply in this thread - but this will only check package-owned files.
You say "a lot" of your findings are directories or links ... what does that mean? Are all of them? There typically should not be any regular file with 0777 permissions, and if there is one it's worth looking into. Does the following command return any results?
find / -type f -perm 0777"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
that "-type f" is a good advice. i checked the system, no 777 files there, except in home directory.
is there an option to check for only the last digit, the public setting like 0**7 or 0**6?
Offline
Yes there is. Are your man pages broken?
Last edited by Trilby (2022-08-06 17:25:42)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Pages: 1