Home > permissions > Running Apache as FTP users

Running Apache as FTP users

April 17Hits:1

I have an Ubuntu server. Apache, MySQL and VsFTPd are running on it and it hosts more than one web sites. Every web site owner has an FTP user to upload files. However, Apache is running as www-data, as default. Thus, the files uploaded using Wordpress and cache files created by caching plugins of Wordpress are owned by www-data. In order to upload files one must make his folder's permission 777, which is not safe.

Should I make Apache run as separate users for each customer?


IMO you are best off using one of two options. First would be some sort of virtualization, for example lxc , openvz, or KVM. This option gives the most separation.

Your second, and perhaps better option, is to use a feature called "home directories".

sudo a2enmod userdir

Restart apache2 daemon with following command

sudo service apache2 restart

Ceate folder “public_html” in the home directories, then set permission public_html folder to 0755

mkdir ~/public_html && chmod 0755 ~/public_html

Configure your vitrual hosts to use /home/user_name/public_html as the web root.





Related Articles

  • Running Apache as FTP usersApril 17

    I have an Ubuntu server. Apache, MySQL and VsFTPd are running on it and it hosts more than one web sites. Every web site owner has an FTP user to upload files. However, Apache is running as www-data, as default. Thus, the files uploaded using Wordpre

  • Running Apache as system service on Windows 2003 R2 64-bitOctober 19

    Trying to make my point, that running Apache with PHP5 module as Windows service is not secure. All I got to prove it - FTP access to some internal website. So what I did - I uploaded file test.php with content: <?php system('whoami'); // output: nt

  • Running WordPress as FTP user?December 21

    I've been doing some research on file permissions as of late, as my WordPress installation on my VPS doesn't have write access. From what I've heard it's very dangerous to make the apache user the owner of your WordPress files, as apache can then do

  • Running Apache on WindowsFebruary 27

    The Apache web server is gaining new momentum in 2005 after Netcraft reported them relatively flat in market share last year. The February web server survey shows them gaining a bit more than a percentage point year to date. While that may seem low –

  • Running apache as an unpreviledged userDecember 2

    I've heard that one could run the apache2 web-service as just a user without having root access privileges. How could I do this? I'm not asking if I could set up Apache to run as a user (say for security reasons), but rather as a user how can I run A

  • How to reduce a number of simultaneously running Apaches?December 12

    I have a VPS with root access at my hosting (Dreamhost). When I type top in console I see a huge number of running Apaches. See fragment: 14464 dhapache 20 0 119m 9900 1724 S 0 2.3 0:00.05 apache2-ps13837 14939 dhapache 20 0 119m 9868 1704 S 0 2.3 0:

  • How can you obscure the fact that you are running Apache?January 23

    How can I make it appear as though I'm not running Apache? I figure the best way is to appear as though it is another type of httpd, like lighthttpd or iis. I know that by using mod_security you can change your server signature into anything: SecServ

  • Apache2 - Run Apache as the user's accountFebruary 13

    I just got my very own Linux (Debian Stable) server, and installed Apache2, PHP5 and MySQL. It's supposed to be used for hosting of my own and others websites. As it is now, Apache is running as its own user. That means that I need to "chown" al

  • Is it advisable to run Apache in a chroot jail?June 3

    I have been advised by a sysadmin guy I know, to run Apache in a chroot jail, for increased security. I have the following questions: Is this advisable (i.e. are there any 'gotcha's that I need to be aware of) ? Does running Apache in a chroot jail a

  • Running Apache 2.2 as another user on Windows Server 2008 R2June 8

    I would like to run apache as a limited user on Windows 2008 R2 for security reasons. I've created a user in the user group (let's call it apache), and set the user to run as in the services pane, but then I am unable to start the service (probably n

  • How to Run Apache and IIS at the Same Time: Part 1

    How to Run Apache and IIS at the Same Time: Part 1July 13

    Whether you're a freelancer or an employee, it's often necessary to work with a diverse range of platforms and applications to get the job done. If you're a PHP developer, you may become involved with Microsoft SQL Server and Windows hosting. If you'

  • Empty IPv6 address causes DNS error on Macs running Apache ServerSeptember 10

    For a site I manage, http://archstl.org/, the DNS entry returns an empty (::) IPv6 address when I run $ host archstl.org in the Terminal. I think the errant IPv6 entry may be the cause of my problem: when a Mac user running Apache Web Server (any fla

  • How do I run Apache & IIS 7 on the same IP address (different ports)?November 16

    I have a Windows Server 2008 machine which is running Apache at the moment for a public facing PHP site (port 80). IIS is stopped. I now need to start running IIS on the same IP address as Apache, but I can happily use another port as it's internal o

  • How to run Apache as another user? (as 'www', or 'apache') on myDecember 5

    I just recently deployed a LAMP stack that came as a package for Linode (a VPS host), I can successfully run Apache 2 but the process and all my files within are owned by root. On my shared web host I could run as nobody or similar to help restrict a

  • Problem running Apache-Tomcat on every web browser installed in Windows 7February 9

    I'm working on a web application in JSP and my web container is Apache Tomcat 7.0.2 (Its portable cross-platform version). As I've made extensive use of HTML5-CSS3 and my target browser is Google Chrome, I'm able to run the the Apache server only in

  • Need suggestions for a R/W distributed file system for a webserver cluster running Apache+PHPMarch 14

    In the last few months, I've been trying to find the best way to share the content of multiple websites across multiple web servers (12+) all running Apache+PHP. One of the biggest challenge I face is that we need to be able to read and write to the

  • Can't run Apache - Would having Ruby on Rails and mysql server installed on the same machine be the reason why?April 11

    everyone. I am trying unsuccessfully to run Apache on my machine. I used the command line to find out all the applications that are using port 80 and I ended them, but Apache refuses to run on my server after that. I have a Ruby on Rails web service

  • Running apache with the doc root as an SMB shareMay 3

    I'm in Ubuntu 10.10, just mounted my new NAS in the /media directory. I then proceeded to add a new DNS entry called newtesting.cdw, and added this as a virtual host to my apache (using webmin). When I try to access the address, it doesn't work, it w

  • When to run apache httpd + tomcat?May 25

    What are the primary benefits of running apache httpd in front of tomcat? Are the benefits worth the extra setup and complexity? --------------Solutions------------- Apache offers a full and extensive suite of modules, which support URL rewiting, acc

  • Is there a performance problem if I run apache on multiple ports for various domains?May 27

    I have two domains right now. Both run on Apache and are behind nginx (using proxy_pass). One site is django and another is php and both are running on different ports. I want to deploy more domains in similar fashion, however is running apache on mu

Copyright (C) 2017 ceus-now.com, All Rights Reserved. webmaster#ceus-now.com 14 q. 0.536 s.