Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8684175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T22:14:19+00:00 2026-06-12T22:14:19+00:00

I would like configure apache to create files with personalized owner:group and chmod. I

  • 0

I would like configure apache to create files with personalized owner:group and chmod.
I have an folder of website who need to be manipulated by apache + (ftp) user.

Actually i do an (where ‘mygroup’ is group of ftp users)

chown www-data:mygroup -R /my/website/files
chmod 770 -R /my/website/files

But when apache2 manipulate files and create files or folders, they have

-rw-r–r– 1 www-data www-data

Any idea for configure apache2 ?

Edit: Debian 6

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T22:14:20+00:00Added an answer on June 12, 2026 at 10:14 pm

    There is no real good way to do this AFAIK. Stock version of Apache doesn’t have a mechanism to spawn workers under different users per request. All of its workers operate under the user and therefore can’t write files as another.


    That being said, there are some ways around this.

    The first way will require you to run Apache as root. Apache, as it sits on your server, is running under an unprivileged user. Unprivileged users can’t change the user that they run under. Only processes run as root can do that. If you are willing to run your Apache as root, there is a multi-process mod available here. What it does is allow you to run each VHOST under a different user (defined in your config). That means you would now also need to set up each user with their own VHOST. This way would work, but you are sacrificing a bit of security by doing this.

    The second, more secure, but more “hacky” way to do it would be to run completely new and individual version of Apache for each user. So you have an Apache with its own set of config files JUST for userA, another Apache with its own different and separate set of configs just for userB, etc. Each instance of Apache could listen on a different port (i.e. userA’s listens on port 8080, userB on port 8081…). Then you could use some kind of front end reverse proxy to sort it all out and route the traffic to the appropriate Apache instance.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to be able to merge two files into one during configure
I would like to configure apache php5 in a way that .css and .js
I would like to know how to configure apache (with .htaccess or any other
I would like to configure JBoss 4.2.x to utilize the JBoss Web Native Connectors
I am using Unity for IOC. I would like to configure the creation of
HttpServletRequest.getRemoteAddr() in Tomcat returns IPv6 formatted IP address, but I would like to configure
How can I configure the NppExec plugin for Notepad++? I would like NppExec to
I would like to configure an object's properties at runtime either via a properties
I have a PHP app that I would like to test against various PHP
I am using latest Apache CXF to create a webservice. I have configured ws-security

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.