HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Owner of files (http://www.howtoforge.com/forums/showthread.php?t=57370)

ondra.cz 22nd May 2012 13:38

Owner of files
 
Hello,
I would like to change owner of .php files of all websites to only one owner to be able to access all websites throught one FTP connection and be able to update files throught subversion. But when I change userID, I get 403 Forbidden error.

How can I disable this check of userID? I understand, that this is because of security reason, but I use VPS just for personal purpose and this complicates my work.

Thanks

till 22nd May 2012 14:46

The setup you want to use is not supported by ispconfig as its unsecure. If you want to use it anway, you will have to change the ispconfig sources.

ondra.cz 22nd May 2012 15:33

Thank you for answer. Can you please direct me where should I look for?

ondra.cz 24th May 2012 13:51

And I don't think that this is a restricton of ISPconfig, but some restriction of apache/php, isn't it?

till 24th May 2012 14:07

The restriction is not from ispconfig. but it gets applied as you uploaded data with a different user then the one that is configured for this vhost and this user is set and configured by ispconfig.

In a ispconfig setup, every website has its own user. If you wnat all sites to run under the same user, you will have to modify the ispconfig code so that ispconfig uses the user ww-data or whatever you want to use as user for all sites. the user of the site is set in the file /usr/local/ispconfig/interface/plugins/sites_web_domain_plugin.inc.php. The interesting lines are:

$system_user = $app->db->quote('web'.$page_form->id);
$system_group = $app->db->quote('client'.$client_id);

change it to something like:

$system_user = 'www-data';
$system_group = 'www-data';

The user and group name might differ for different linux distributions.

ondra.cz 24th May 2012 16:05

Thanks for answer.

Can you please explain me, what this fix will exactly do? So far I understand, it will only update rows in DB and will have no affect to apache or files. I'm just trying to understand, how this works.

till 24th May 2012 16:09

This code sets the user when a new site is created.

ondra.cz 24th May 2012 16:51

Ok. And how to change user of existing sites?

till 24th May 2012 17:12

You cant change the owner of existing sites without editing a lot of database records and severalconfig files manually. Better delete the sites and recreate them.

Please be aware that the modifications that you plan make your system incompatible with future ispconfig updates, so you can not install any updates without breaking your server.

ondra.cz 24th May 2012 17:59

Thank you till for your answers, I will try it.


All times are GMT +2. The time now is 10:13.

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