# su -s /bin/bash nobody And find out just how much stuff you've accidentally left world readable on your systems.
-
-
Replying to @marcan42
I’d have to check the man page, but I know for a fact that find can do that for you. I’ve done it for that very reason. That and to find world writable files.
1 reply 0 retweets 0 likes -
Replying to @DrScriptt
Find as root cannot test for world readable/writable files. It can test the mode bits of the *files*, but cannot take into account parent *directories*. Mode 644 stuff inside a 750 directory is a common pattern. Easiest way to test is to just su to nobody and run plain find.
1 reply 0 retweets 0 likes -
Replying to @DrScriptt @ssrjazz
World r/w files in a directory without world r/w permissions have to be excluded, of course. As I said, this is a common pattern. You can make your /home 700 and that immediately excludes everything under it from being a problem. Hard links will show up at their other location.
1 reply 0 retweets 0 likes -
The hard link won’t show up if it’s created after the scan. The file is still insecure. Thus why I dislike world r/w without good reason.
1 reply 0 retweets 0 likes -
Replying to @DrScriptt @ssrjazz
You cannot create that hard link without access to the original file. The only way to access the original file is to have access via all the file path components, or to receive a directory fd from a process which does (at which point it's delegating permissions to you).
1 reply 0 retweets 0 likes -
I believe it is possible to create a (hard) link to an inode without actually accessing any of the other links to it. Thus you can access the inode, thus file, independently of the path that it is in.
1 reply 0 retweets 0 likes
It is not. The closest thing is linkat(2), which requires an open file descriptor to a parent directory of the original link and access permissions to all subsequent path components. That can be used to bypass path restrictions only if another process with access delegates to you
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.