Trying to find out what permissions user ‘_www’ has on my OS X server. I need to find out if it has root access, if it could access any system files or if it can simply access the standard top level ‘Websites’ directory for Writes.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Well, you can look in
/etc/groupto see which groups_wwwbelongs in:On a properly configured server, the whole point of running the web server as a dedicated user is to limit that user’s privileges elsewhere. However, web application code which accesses the filesystem is capable of reading outside the server’s DocumentRoot.
Therefore, any file not owned by
_wwwbut for which it has read permissions and execute on the file’s parent directory could in theory be read by_wwwif the application code doesn’t protect against that while reading the filesystem. Likewise, files on the filesystem which are other-writable could be modified by the web server if the application code provides access to them.Such issues are exploitable when an application uses user input to generate a file path for reading or writing, but fails to guard against input like :
../../../../../../../../../which, when possibly coupled with a NULL byte injection could produce filenames in the application likeOf course, on a modern system,
/etc/passwddoesn’t actually store passwords, but it may reveal local users and other valued info to a potential attacker.