suphp cgi-bin

Discussion in 'Installation/Configuration' started by dimitar, Nov 28, 2007.

  1. dimitar

    dimitar New Member

    Hi All,

    i have the latest ispconfig version on this server with suphp enabled, everything works fine and without problems.

    untill....

    I try to install phpmotion on 1 of my sites (its a php script for managing video sites, streaming e.t.c.)

    according the manual i have installed it in the webroot of the account and put the cgi scripts in the account cgi-bin folder.

    The problem is that the cgi scripts are executed with the rights of the web server user not under the previleges of the account owner. From that comes the problem that in the temp folder everything is owned by www-data and then all the videos are saved also with www-data as owner.

    My question is:
    How can i make so that the scripts that are in the cgi-bin folder are also executed under the previleges of the account admin user?

    Thanks
     
  2. Hans

    Hans Moderator ISPConfig Developer

    If you upload the cgi script via FTP within your /var/www/webX/cgi-bin folder, the account admin user is able to execute the script instead of www-data because he is the creator/owner of the script.

    Another option is to use the chown command like this:
    chown -R -v -f webX_admin:webX cgi-bin/*

    (webX_admin is the account admin and webX your webnumber, as created with ISPConfig).
     
  3. dimitar

    dimitar New Member

    thanks Hans,

    but thats not exactly the problem...
    the cgi's are already owned and excutable by the adminof the website. The problem is that these cgi's make files that are owned by www-data (for example when converting videos they saved them with privileges for www-data not for webX_admin)

    can that be changed, or is there any workaround? or just the cgi's should be rewritten?

    Regards
     
  4. Hans

    Hans Moderator ISPConfig Developer

    Sorry for misunderstanding.
    I do not have a solution for your problem then, but maybe it is a idea to have a look to that script to see why www-data:www-data is used.

    Maybe you can make a small modification to the script so that your webadmin:webX will be used instead.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Please make sure that you created a user in this website where the "administrator" checkbox is enabled. If the sites does not have a administrator, the default apache user and group is used to execute the script.
     

Share This Page