HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=15)
-   -   Web Users and permissions (http://www.howtoforge.com/forums/showthread.php?t=25641)

vaio1 30th July 2008 20:13

Web Users and permissions
 
Hi folks,

which is the web user who manage the apache?

when I have developed my application I have supposed that If I upload a file in a web5 dir the user owner is apache and not web5.

How can I solve this problem?

Furthermore if I try to install, for instance, Joomla the files installed will have the user: apache and not the user web5. Why?

thanks

Darren996 31st July 2008 01:10

For Joomla you have to run under the user not apache, so you want to user suExec or suPHP. I had more luck with suPHP.

http://www.howtoforge.com/apache2_suphp_php4_php5

vaio1 31st July 2008 07:18

Hi Darren996,

but if you create a simple uplload form in your web5 user when you upload a file which is the user and which are the permissions?

thanks

till 31st July 2008 08:09

Quote:

Originally Posted by mturillo (Post 138770)
but if you create a simple uplload form in your web5 user when you upload a file which is the user and which are the permissions?

This depends on your server configuration:

if you use mod_php, the file is owned by the apache user. If you use suphp, the file is owned by the administrator of the web.

Generally it is better if a file is owned by the administrator of the web. You can easily make it readable for the apache user by executing a chmod +r on the file in the upload script.

vaio1 31st July 2008 08:22

Hi Till,

yes, it is what I thought. So there is not an automatic way to assign the owner at the uploaded file without the suPHP. Right?

thanks

till 31st July 2008 08:31

SuPHP is assigning the correct owner, and this is the administrator of the webiste. The apache user is not the correct owner. If you want all files to be owned by the apache user, use mod_php and not suphp.


All times are GMT +2. The time now is 09:32.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.