File Permissions

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
SleightfulMind
Forum Newbie
Posts: 3
Joined: Mon Mar 27, 2006 1:51 pm

File Permissions

Post by SleightfulMind »

I have a script that ideally will allow users to subscribe to e-mail services. When they subscribe, the script adds some values to a MySQL table so that the MTA knows they are a valid user. Next, the script executes maildirmake to generate the new mail directory. The problem is that the MTA won't write to the directory unless the directory is owned by virtual:virtual. I tried the internal chown function and exec('chown -R /path virtual:virtual') but they complain that PHP has insufficient permissions. Is there a way to make this work besides running apache under the virtual user/group? When I run apache under virtual, many of my PHP extensions will not load (mcrypt for one).

Thanks for any comments.
Post Reply