1

Topic: Running apache with another user (than www-data)

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.96
- Linux/BSD distribution name and version: Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Apache 2.4
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====

Hello,

using apache 2.4

Is there any convenient way I can change owner on files and folders from www-data to web-data forexample.

Thanks in advance,
Taff

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Running apache with another user (than www-data)

sudo chown forexample:forexample -R /var/www/*

will change everything in the directory /var/www (but not the www folder) to be owned by forexample

3

Re: Running apache with another user (than www-data)

thanks for the answer,
but that would be just too easy ;-).

The problem is that iredmail has folders in different folders that get owned by www-data for example

under /opt/iredmail
and under
/etc/apache2

probalbly the quetsion would be better if I asked where are all the fiels and folders which get owned by www-data during install from iredmail

thanks in advance,
taff

4

Re: Running apache with another user (than www-data)

ok,
after a bit of googling,
this should do it:

sudo find / -user www-data -exec chown newuser:newgroup {} +

haven't tried it yet though

greets,
taff

5

Re: Running apache with another user (than www-data)

Just change files under /opt/www should be enough.

But seriously, why change it? Other softwares installed with apt-get will use 'www-data:www-data' by default, and you have to fix it again. Also upgraded softwares will use www-data again, you have to fix it again. So, why bother?