pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:
I'm writing some tests of file ownership, which obviously are pointless if the system isn't a multi-user system. Is there a best way to determine if the system my thing is running on is in fact a multi-user system?
Thanks!
-Pileofrogs
Update: Thanks for your responses! I'll try to clarify my question:
- This is actually more of an academic question than a practical question.
- I'd like to avoid checking a great big list of OSs.
- For this question, I'm defining multi-user as any environment in which the idea of file ownership is valid. So, maybe a more precise way of asking my question is, is there a 'best' way to determine if the system supports the idea of file ownership.
Another Update: Oh, and you can have Os's with multiple file systems, some of which do and some of which do not support the idea of file ownership.... Ugh...
I think I'd really like a command or set of commands that will succeed in on a system that supports the idea of file ownership and fail on a system that does not.
Yet Another Update: When I say, I'd like to avoid checking a big list of operating systems, I mean I'd like this to work on an OS I've never heard of. I'd like it to work on an OS that doesn't exist yet.