Need help with setuid/chmod

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Need help with setuid/chmod

Post by nielsene »

I have two configuration management scripts I use for testing. The two scripts copy different stock configurations into the "live" configuration file picked up by the application. I need to let my automated test code run these scripts, without giving the webserver write permission into the configuration directory.

The scripts work when run by me.

I thought this was the kind of place to use the setuid bit. The files are owned by me, but in the www group (used by the server). The permissions on the files are -rwsr-xr-- (4754). However I still get a permissions denied error when the script is invoked by the webserver when it tries to copy the file.

The file I'm trying to copy over is
"-rw-r--r-- 1 nielsene wheel ...." (blasted filter....)

What am I doing wrong?
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

I've given up on the setuid approach, have been tryingg a sudoers approach. No error messages, the script runs to completion, but no file coped....
Post Reply