#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2012
    Posts
    1
    Rep Power
    0

    Run a bash script using CFEXECUTE as a specific user


    Is there a way for me to run a script with CFEXECUTE as a specific user? If I change the ColdFusion runtime user to the user required to run the bash script, it works, but I don't want my entire site to run as this user, only the page that will run the bash script. By default, 'nobody' is the user.

    I've tried creating a starter script to issue the "su -c" command, but it does nothing. I've changed the permissions and added a sticky bit (+s), but CF will not run it as that user.

    Is there anything else I can do?
  2. #2
  3. No Profile Picture
    Moderator

    Join Date
    Jun 2002
    Location
    Raleigh, NC
    Posts
    5,243
    Rep Power
    967
    For security reasons, I don't think you can do this from cfexecute. I believe you'll have to give the appropriate permissions to the user the CF service is running under to let it run the script.

IMN logo majestic logo threadwatch logo seochat tools logo