Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Apr 09, 2012 7:56 pm 
Offline
Newbie

Joined: Mon Apr 02, 2012 6:54 pm
Posts: 4
Location: Philadelphia, PA
Hello,

I'm running Lucid Ubuntu with Apache2.
Mostly my site works well.

But: when PHP scripts execute mkdir() or move_uploaded_file commands, the newly created folders/files are owned by another unix user, not www-data. www-data owns the containing folder.

I did create this other user, but it shouldn't be owning these files.

When I log in with my public key, a different user -- not the troublesome one -- is used.

The troublesome user also owns my PHP sessions when they get created, although nothing else.

When I delete the user (the bad one) I can't restart Apache -- I get "bad username." My PHP sessions also break.

So I add the user again and I'm back where I started.

Any ideas?

Thanks so much,
Elliot


Top
   
 Post subject:
PostPosted: Mon Apr 09, 2012 10:11 pm 
Offline
Senior Member

Joined: Mon Aug 31, 2009 2:33 pm
Posts: 78
Location: The OC
It sounds like PHP is running as the "troublesome" user. How are you running PHP (mod_php, cgi, fpm, etc.)?


Top
   
 Post subject: Solved.
PostPosted: Tue Apr 10, 2012 12:07 pm 
Offline
Newbie

Joined: Mon Apr 02, 2012 6:54 pm
Posts: 4
Location: Philadelphia, PA
Bjl-

Thanks for thinking about this. I had mpm directives that made apache run as the troublesome user. In /etc/apache2/sites-enabled/<site name>. Not sure how that happened, but it's fixed now.

Apologies, this seeems like a noob mistake. Thanks again for responding.

-Eliot


Top
   
 Post subject:
PostPosted: Tue Apr 10, 2012 3:39 pm 
Offline
Senior Member

Joined: Mon Aug 31, 2009 2:33 pm
Posts: 78
Location: The OC
No problem. Glad to see you got it figured out.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group