Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: need broswer to run shell script w/root perms.  (Read 8650 times)

0 Members and 1 Guest are viewing this topic.

maevek

  • Guest
need broswer to run shell script w/root perms.
« on: August 06, 2004, 10:41:15 AM »
 ???
   I have a shell script that copies from our QA system
to the Production system. (same server actually, just different
directories).
   I would like to add a "chown -R apache:apache $1" to the
script to insure that files in the Production system will be able
to be replaced by the copy script.  
  The ownership in Production is variable, depending upon
the website.

  I've had advice to make the copy script (in cgi-bin)
owned by root:root, then to do a chmod 4755.
  Well, it's just not working.
  If I test it as the root user, works fine.
  If I test it as the web-server user (apache) I get all kinds
of permissions errors.  I thought the chmod 4755
to do the "setuid" on the script would solve this.
--------later----------
  I've discovered the "setgid" bit, and maybe that's
what I want to set on the destination directory.
   But there again, I need to be able to
execute a setgid on a directory, using a script executed
by apache (php exec command).

 
 Thanks, -- Maeve
« Last Edit: August 06, 2004, 12:40:05 PM by maevek »