Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- Date: Sat, 27 Nov 2010 18:30:39 +0900
- From: "Stephen J. Turnbull" <stephen@example.com>
- Subject: Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- References: <4CEB46A8.6000202@example.com> <AANLkTikFnEpNOH6xa48Lio3e0XSGRDD9tDyJ_SM01NLv@example.com> <4CED3243.6070002@example.com> <AANLkTi=eq-A8nXOXFxg63FBc4mNE1pjY-v+o7g-c=PVi@example.com> <87d3pubise.fsf@example.com> <4CEE84F0.3080807@example.com> <4CEF3663.5070001@example.com> <878w0g7j80.fsf@example.com> <4CEFF98C.4030207@example.com>
s smith writes: > On 11/25/2010 9:21 PM, Stephen J. Turnbull wrote: > > Even if it works, you don't want to do that. It opens your system up > > to potential directory traversal and trojan attacks because there's a > > race condition. > > > It would only open for the process -- umask for file creation for this > process and maybe its children, right? Yes, *but those 0777 permissions are written to disk by mkdir*. This opens up the possibility that other processes will screw with your data. That's why I wrote "race condition", there has to be somebody else out there to race with. Here the race is "until I remove that directory". > Also, nobody is a special user (user id #2 I think), right? I think > it's a restricted user -- but am not sure exactly how it's restricted > user but am not sure what the restrictions are. Normally, nobody is an ordinary user, typically with uid = (uid_t) (-2). The restrictions are implemented using standard mechanisms by making nobody a member of no groups. That's all. This means that with standard 06.4 or 07.5 perms nobody can look but not touch anybody's stuff, and with 06.0 or 07.1 or 07.0, nobody can't even look. However, some app writers who didn't think about the implications started using "nobody" as the owner of their server processes. But suppose you run both Apache and PostgreSQL as "nobody". Now both can read and write each others's stuff! Ouch! It's a very bad idea to have file system objects owned by nobody for this reason, unless you really want unauthenticated users writing to your file system.
- Follow-Ups:
- References:
- [tlug] Arrrg! Permissions driving me nuts in PHP
- From: Dave M G
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP
- From: Edmund Edgar
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP
- From: Dave M G
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP
- From: Sach Jobb
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP
- From: Stephen J. Turnbull
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- From: Dave M G
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- From: s smith
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- From: Stephen J. Turnbull
- Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- From: s smith
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- Next by Date: Re: [tlug] Arrrg! Permissions driving me nuts in PHP [UN-SOLVED]
- Previous by thread: Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- Next by thread: Re: [tlug] Arrrg! Permissions driving me nuts in PHP [UN-SOLVED]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links