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: Fri, 26 Nov 2010 21:07:32 +0900
- From: Darren Cook <darren@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>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10
> > Does umask permissions take precedence over mkdir permissions? It might > > be worth trying a umask 0 before the mkdir command. > > 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. I'm not sure about how you get all that exciting stuff (The manual describes it as "PHP's umask", so it only applies to PHP scripts), but as the manual emphasizes you need to be careful in a web server as your umask change will apply to all php scripts running in that web server. So any other php scripts on your web server that do anything while these three lines are being processed: $old=umask(0); mkdir($dirPath,0777); umask($old); could be created with unexpected permissions. I still think you should try it to see if works. Useful information, one way or the other, in tracking down the problem. (Or try Stephen's below idea first of checking/fixing permissions and ownership on the parent directory of $dirPath.) Darren > really wants to fix the process owner/file owner skew. My guess is an > old owner spec of nobody for the parent directory with set-uid bit > set. (I can't remember whether that's supposed to make files inherit > user ownership, but set-gid should work for inheriting group > ownership.) And now apache is running under www-data or apache. Or > something like that. -- Darren Cook, Software Researcher/Developer http://dcook.org/gobet/ (Shodan Go Bet - who will win?) http://dcook.org/work/ (About me and my work) http://dcook.org/blogs.html (My blogs and articles)
- 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
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] Arrrg! Permissions driving me nuts in PHP [SOLVED]
- Next by Date: Re: [tlug] Backup Software
- 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 [SOLVED]
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links