Reply to Re: Weird Permissions Problem With Includes

Your name:

Reply:


Posted by Jerry Stuckle on 02/03/07 21:31

Carl wrote:
> On Feb 2, 7:13 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
>> kwest wrote:
>>> Carl,
>>> Yes that is the weird thing, I gave read and execute permission to the
>>> incude I even chmoded them all to 777 to debug the problem and still
>>> get the same error.>
>>> If I run the script from the command line it works. So am guessing it
>>> has to be something with Apache. I am using Apache 2 if that helps.
>>> Thank You
>>> - Ken
>>>>> Carl.
>>>> Sorry, that didn't come out right at all.
>>>> What I meant to ask was if the apache user had read access each script
>>>> you are trying to include? I don't believe that execute permission is
>>>> required.
>>>> Carl.
>> Carl,
>>
>> PHP scripts are not executed. They are interpreted. You should not
>> have execute privileges on them.
>>
>
> Hi Jerry,
>
> I think you misread the attribution on earlier posts in this thread
> and mistakenly addressed your post to me instead of the orig poster,
> Ken. I certainly never recommended that the scripts need execute
> access, and actually suggested that they do not.
>

Yep, sorry. By the time I got here I had already read over 1500
messages in several newsgroups. To say my brain was a little fried
would be an understatement :-). Sorry.

> As a side note, PHP scripts can infact be executed by the shell
> directly (using the "shebang" to invoke the PHP interpreter) when
> calling PHP scripts from the command line, cron jobs, etc. In these
> cases, execute privileges should be given to the user/group. This does
> not apply to this case, however.
>

Yep, it doesn't apply, which is why I didn't mention it here. No use
tossing in unnecessary complications.

>> Your error message indicates the Apache user does not have read access
>> to the scripts. But this can also show up if you give the file too many
>> privileges - like 777.
>>
>
> What?!? Why would setting a file permission to 777 deny read access?
> It should do exactly the opposite, giving owner, group and all users
> complete access to the file! Do you have any sort of reference or
> citation for this claim?
>
> @ Ken,
>

Because PHP doesn't like a file with *too much* permission. Can't say
as I agree with the PHP developers - but it seems the check it at times
and don't allow you to open a file with too much access.

For reference - search this newsgroup for other, similar messages. It
pops up every couple of weeks. And while I've seen the problem, I've
never seen this documented anywhere.


> This thread was two days inactive when Jerry revived it, and I hope
> you solved your problem by now. If not, double check the permissions
> on the file and any directories leading to the file and post back if
> your still having problems.
>
> Cheers,
> Carl.
>

Yea, sorry it took so long. Was busy rebuilding a crashed disk.

>> Try just giving it read access to everyone. Or make the Apache user a
>> member of the group which owns the file and give the file group read access.
>>
>> Of course, you could also make the apache user the owner of the file.
>>
>> --
>> ==================
>> Remove the "x" from my email address
>> Jerry Stuckle
>> JDS Computer Training Corp.
>> jstuck...@attglobal.net
>> ==================
>


--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация