Owner of files

Discussion in 'Installation/Configuration' started by ondra.cz, May 22, 2012.

  1. ondra.cz

    ondra.cz New Member

    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
     
  2. till

    till Super Moderator

    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.
     
  3. ondra.cz

    ondra.cz New Member

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

    ondra.cz New Member

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

    till Super Moderator

    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.
     
  6. ondra.cz

    ondra.cz New Member

    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.
     
  7. till

    till Super Moderator

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

    ondra.cz New Member

    Ok. And how to change user of existing sites?
     
  9. till

    till Super Moderator

    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.
     
  10. ondra.cz

    ondra.cz New Member

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

Share This Page