Skip to main content

Thread: Apache2 - New guy with Questions and looking for advice.


hi guys,
after little advice regarding apache2 , keeping secure, started read article on apache website relating security tips

, mentioned apache2 starts root user , switches user defined in apache2.conf file, when

code:
ps aux | grep apache
i following results, presume apache2 process still running root normal?

code:
root      2127  0.0  0.2   5420  2576 ?        ss   16:03   0:00 /usr/sbin/apache2 -k start  www-data  2129  0.0  0.1   5192  1760 ?        s    16:03   0:00 /usr/sbin/apache2 -k start  www-data  2130  0.0  0.2 226836  2180 ?        sl   16:03   0:00 /usr/sbin/apache2 -k start  www-data  2131  0.0  0.2 226836  2184 ?        sl   16:03   0:00 /usr/sbin/apache2 -k start
i may mis-understanding wording in apache link mention folders apache software accesses serving user content should belong user apache running as, in case www-data quick listing of /var/www/ folder shows owner root.

code:
me@myserver:/var$ ls -la www  total 12  drwxr-xr-x  2 root root 4096 2011-12-28 15:30 .  drwxr-xr-x 15 root root 4096 2011-12-28 15:30 ..  -rw-r--r--  1 root root  177 2011-12-28 15:30 index.html
again normal? or should chown'ing folders www-data ?

if happens have reference material on securing apache box, setting 1 etc appreciate links etc our companie looking start using linux , apache2 more , more in next 12 months, internally public facing, brush on subject , head around do's , don't way before decide start running production servers , end getting done on due poor security practices.

the first apache instance root privileges "parent" of "children" running www-data user. children handle requests; parent manages them.

since /var/www , /var/www/index.html have world-readable permissions, ownership of directory doesn't matter here. if wrote script needs write files, you'd have place them in directory owned www-data user.

bigger issue concerns how files written /var/www directory. if want ordinary users place files there, you'd need adjust permissions. more complicated issue , has been addressed here time time.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Security [ubuntu] Apache2 - New guy with Questions and looking for advice.


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account