[BlueOnyx:00558] Re: Brian type permissions question..

Jeff Jones jeffrhysjones at mac.com
Wed Feb 18 13:47:50 -05 2009


Wow. You know that is EXACTLY what Brian would have said! And it  
worked! So now I really am suspicious!

So now my file UIDs are all apache, but from what you say - uploading  
via FTP (user admin say) is going to replace the UID back to admin and  
cause another problem.

Are you saying that after FTPing my files up - I'm going to have to  
manually change each one back to apache?

Or (mini Brian-wave) if I upload using the site administrator account  
- this should be in the site1 group, and therefore should work.

Am I right? Or have I just completely exposed to the world my complete  
misunderstanding of linux permissions..?

Jeff


On 18 Feb 2009, at 18:24, Michael Stauber wrote:

> Hi Jeff,
>
>> Perhaps you are really Michael - the same person? Hmm!?
>
> Haha, now that's a funny thought. :o)
>
>> I seem to have some sort of fundamental permissions problem with  
>> PHP &
>> BO (or pehraps PHP and ME)
>>
>> I have my /home/sites/www.foo.com/web/ folder - just to avoid  
>> issues -
>> I've set it to RWX RWX R or 774 for now. I then would probably go 744
>> later.  I have admin as the owner (which is default), and site1 as  
>> the
>> group (also default). So this should all just work.
>>
>> And it does -  works fine on all my BQ sites - but for some reason -
>> I'm getting 403 forbidden on this BO box.
>>
>> If I change the group to apache - then it works. But I don't want to
>> do that.
>> If I change it back to site1 group - and then apply 777 - then it
>> works. But I REALLY don't want to do that.
>
> Try this: Set the UID to "apache" and the group to "site1" (or  
> whatever the
> site number is). Then you should be able to make do with 774  
> permissions.
>
> The thing here is as follow: When a PHP script tries to write a file  
> to the
> webspace, it does so as user "apache" and the GID is inherited from  
> the
> toplevel directory of the web tree. So your files and folders ought  
> to be
> writeable by user "apache".
>
> Using "admin" or the UID of the siteAdmin for that site won't cut  
> it. The
> obvious drawback is of course: You can either upload by FTP, or have  
> your PHP
> script handle the files. But both at the same time will lead to UID  
> conflicts
> where either FTP or the PHP script is unable to overwrite files.
>
> -- 
> With best regards
>
> Michael Stauber
>
> _______________________________________________
> Blueonyx mailing list
> Blueonyx at blueonyx.it
> http://www.blueonyx.it/mailman/listinfo/blueonyx




More information about the Blueonyx mailing list