Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Files permissions a bit weird
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 490
Location: Rosario, Argentina

PostPosted: Sun Mar 16, 2025 5:29 pm    Post subject: Files permissions a bit weird Reply with quote

I don't know what could have happened, but I found many files with 777 permissions.

Code:
sudo find /usr -perm 777 -exec ls -l {} \; | more

-rwxrwxrwx 1 root root 14352 mar  8 08:37 /usr/bin/unzip-mem
-rwxrwxrwx 1 root root 14272 mar 15 23:10 /usr/bin/ruby32
lrwxrwxrwx 1 root root 23 mar  7 09:12 /usr/bin/avr-ar -> /usr/libexec/gcc/avr/ar
-rwxrwxrwx 1 root root 41520 mar  3 21:50 /usr/bin/newuidmap
-rwxrwxrwx 1 root root 282720 mar  4 09:32 /usr/bin/cec-compliance
-rwxrwxrwx 1 root root 90 mar  3 23:39 /usr/bin/system-config-printer
-rwxrwxrwx 1 root root 88000 mar  3 22:47 /usr/bin/mdsearch
lrwxrwxrwx 1 root root 23 sep 17  2022 /usr/bin/dwp -> x86_64-pc-linux-gnu-dwp
lrwxrwxrwx 1 root root 15 mar  2 18:10 /usr/bin/sleep -> ../../bin/sleep
lrwxrwxrwx 1 root root 31 mar  9 20:52 /usr/bin/pybabel -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root 3 mar  3 02:39 /usr/bin/gtbl -> tbl
lrwxrwxrwx 1 root root 59 mar  2 17:48 /usr/bin/x86_64-pc-linux-gnu-cpp-14 -> /usr/x86_64-pc-linux-gnu/gcc-bin/14/x86_64-pc-linux-gnu-cpp
-rwxrwxrwx 1 root root 41742960 mar 15 22:51 /usr/bin/docker
-rwxrwxrwx 1 root root 2067576 mar  4 09:59 /usr/bin/recoll
lrwxrwxrwx 1 root root 45 mar  9 21:49 /usr/bin/arm-unknown-linux-gnueabi-ld -> /usr/libexec/gcc/arm-unknown-linux-gnueabi/ld
-rwxrwxrwx 1 root root 56 mar  8 13:27 /usr/bin/wine-vanilla-10.0
-rwxrwxrwx 1 root root 51216 mar  8 14:48 /usr/bin/pw-top
-rwxrwxrwx 1 root root 3665264 mar  8 14:37 /usr/bin/gimp-console-2.10
lrwxrwxrwx 1 root root 66 mar  2 19:30 /usr/bin/x86_64-pc-linux-gnu-gcc-ranlib -> /usr/x86_64-pc-linux-gnu/gcc-bin/14/x86_64-pc-linux-gnu-gcc-ranlib
-rwxrwxrwx 1 root root 34752 mar  3 13:55 /usr/bin/gst-transcoder-1.0
-rwxrwxrwx 1 root root 7562 mar  3 23:46 /usr/bin/gparted
lrwxrwxrwx 1 root root 45 mar  9 21:49 /usr/bin/arm-unknown-linux-gnueabi-nm -> /usr/libexec/gcc/arm-unknown-linux-gnueabi/nm
-rwxrwxrwx 1 root root 8242 mar  9 21:25 /usr/bin/mariadb-dumpslow
lrwxrwxrwx 1 root root 25 mar  3 23:34 /usr/bin/qmlscene5 -> ../lib64/qt5/bin/qmlscene
-rwxrwxrwx 1 root root 1763744 mar  8 10:51 /usr/bin/mpd
lrwxrwxrwx 1 root root 31 mar  3 03:39 /usr/bin/pytest -> ../lib/python-exec/python-exec2
lrwxrwxrwx 1 root root 31 mar  2 22:21 /usr/bin/versioneer -> ../lib/python-exec/python-exec2
-rwxrwxrwx 1 root root 1408144 mar 15 23:17 /usr/bin/upmpdcli
-rwxrwxrwx 1 root root 14352 mar  8 14:48 /usr/bin/pipewire
lrwxrwxrwx 1 root root 4 mar 15 23:16 /usr/bin/unzstd -> zstd
-rwxrwxrwx 1 root root 33311160 mar  8 11:57 /usr/bin/_eeschema.kiface
-rwxrwxrwx 1 root root 257 mar  3 23:12 /usr/bin/ps2pdf12
lrwxrwxrwx 1 root root 44 mar  2 22:35 /usr/bin/jvisualvm -> /usr/libexec/eselect-java/run-java-tool.bash
-rwxrwxrwx 1 root root 79593360 mar 15 22:52 /usr/bin/containerd
-rwxrwxrwx 1 root root 75792 mar  9 21:41 /usr/bin/ibus
lrwxrwxrwx 1 root root 6 mar  8 14:48 /usr/bin/pw-dsdplay -> pw-cat
-rwxrwxrwx 1 root root 80352 mar  4 10:18 /usr/bin/pinentry-curses
lrwxrwxrwx 1 root root 4 mar  8 15:01 /usr/bin/rgvim -> gvim
-rwxrwxrwx 1 root root 67 mar  8 13:57 /usr/bin/wine64-preloader-vanilla-9.0
-rwxrwxrwx 1 root root 2783432 mar  8 12:00 /usr/bin/mplayer
lrwxrwxrwx 1 root root 27 mar  7 09:12 /usr/bin/objdump -> x86_64-pc-linux-gnu-objdump
-rwxrwxrwx 1 root root 59 mar  8 13:57 /usr/bin/winedump-vanilla-9.0


Code:
sudo find /usr -perm 777 | wc -l
472005


Someone ran with this issue ?
Back to top
View user's profile Send private message
Hu
Administrator
Administrator


Joined: 06 Mar 2007
Posts: 23748

PostPosted: Sun Mar 16, 2025 6:22 pm    Post subject: Reply with quote

The symlinks are normal. Symbolic links don't have real permissions[1], and delegate to the permissions on the underlying object.

The non-symlinks look wrong. If I had to guess, someone turned loose a recursive chmod 777 on /usr or maybe even on /. Are there any files under /usr that are not mode 777 for you? What commands have been run with superuser privilege recently?

[1] Some kernel-created magic symlinks follow different rules, but that does not apply to the output shown.
Back to top
View user's profile Send private message
Fitap
Guru
Guru


Joined: 13 Mar 2011
Posts: 490
Location: Rosario, Argentina

PostPosted: Sun Mar 16, 2025 7:12 pm    Post subject: Reply with quote

Honestly, I didn't do anything.
I just recompiled the entire system on 3 pc's that I have.
I tell you that on all the pc's I found the same problem.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum