Skip to main content
Inspiring
March 19, 2010
Answered

cffile writing files as root user

  • March 19, 2010
  • 2 replies
  • 634 views

Hi all -

I have a weird issue im trying to figure out.

A developer recently informed me of a problem in his sandbox.  The cffile upload tag is creating files with the root user and root group command.

Redhat Linux 5.4

ColdFusion 8 Enterprise multi-server

Each developer has his own CF instance

Apache runs as user nobody group nobody

Files are being uploaded to a directory owned by the developers account, group IT, with 777 permissions.  The file uploaded lands in that directory owned as root, group root, with 644 permissions.

Any suggestiosn on where to look?

Thanks so much.

    This topic has been closed for replies.
    Correct answer Owainnorth

    The files will be written by ColdFusion, not Apache - therefore check who CF is running as.

    O.

    2 replies

    Owainnorth
    OwainnorthCorrect answer
    Inspiring
    March 22, 2010

    The files will be written by ColdFusion, not Apache - therefore check who CF is running as.

    O.

    GuitsBoyAuthor
    Inspiring
    March 22, 2010

    Yup, you were right.  The start up script ( /etc/init.d/coldfusion8multi ) referenced the user root, most likely as a bandaid since when I changed it back to the user "nobody" it threw an error.  This was because the user nobody had a default shell of /sbin/null.  When I changed this to give user nobody an actual shell environment, CF finally started user the user nobody.  Looks like its working now.  Thanks!

    BKBK
    Community Expert
    Community Expert
    March 21, 2010

    it isn't yet clear to me what the problem is.