Trouble enumerating root filesystem descendants

(imported topic written by atxrobbie)

I’m trying to find files and directories in the “/” filesystem that are world writeable. Here is the relevance i’m using:

(descendant folders of (folders (names of filesystem “/”)) whose (other write of it = true))

this always returns False even though i know it should return True. I’ve shortened the relevance to see what the output is:

Q: descendant folders of (folders (names of filesystem “/”))

A: //.fvwm

A: //.qt

A: //altboot

A: //bin

A: //boot

If i try the same relevance on a different filesystem this is what i get (and this does return True when expecting True):

Q: descendant folders of (folders (names of drive “/localdisk”))

A: /localdisk/IBM

A: /localdisk/IBM/InstallationManager

A: /localdisk/IBM/InstallationManager/eclipse

A: /localdisk/IBM/InstallationManager/eclipse/atoc

A: /localdisk/IBM/InstallationManager/eclipse/atoc/nq

A: /localdisk/IBM/InstallationManager/eclipse/configuration

any idea why i’m getting “//” when running this against the root filesystem?

thanks,

Robbie

(imported comment written by MarkA.Stevens)

Having a double / seems to happen a lot. However, from experience, *nixes are quite oblivious to the directory separation character (/) being repeated. //root = /root and //usr//bin = /usr/bin. I terminated this search (reason is below).

Q: (descendant folders of folder “/”) whose (other mask of mode of it as string contains “w”)

A: //dev/shm

A: //etc

The “problem” seems to be in just using the / by itself.

Q: (descendant folders of folder “/usr”) whose (other mask of mode of it as string contains “w”)

A: /usr/src/packages/BUILD

A: /usr/src/packages/BUILDROOT

A: /usr/src/packages/RPMS

A: /usr/src/packages/SRPMS

A: /usr/tmp

A: /usr/tmp/vi.recover

T: 2892481

I: folder

In addition searching the top level is a bit interesting:

Q: (folders of folder “/”) whose (name of it contains “//proc”)

T: 83879

I: folder

Q: (folders of folder “/”) whose (name of it contains “/proc”)

T: 316

I: folder

Q: (folders of folder “/”) whose (name of it contains “proc”)

A: //proc

T: 458

I: folder

Finally, you should exclude the /proc filesystem from your searches, as it tends to loop on itself, and you get garbage an ever increasing descent. So you might consider the following.

Q: (folders of folder “/”) whose (name of it does not contain “proc” and other mask of mode of it as string contains “w”)

A: //tmp

T: 762

I: folder

To make this true, you could do the following:

Q: (exists (folders of folder “/”) whose (name of it does not contain “proc” and other mask of mode of it as string contains “w”))

A: True

T: 667

I: boolean

I Hope This Helps … Mark A. Stevens

(imported comment written by atxrobbie)

This helps tremendously! much appreciated!