SAFE MODE Restriction in effect

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
mvitor
Forum Newbie
Posts: 1
Joined: Mon Jan 13, 2003 3:24 pm
Contact:

SAFE MODE Restriction in effect

Post by mvitor »

Hi...
I am tring to do this:

mkdir("dir/mail/".$_SESSION[lastuserid]."/files");
$ex="chmod 777 dir/mail/".$_SESSION[lastuserid]."/files";
exec("$ex &");
mkdir("dir/mail/".$_SESSION[lastuserid]."/files/in");
$ex="chmod 777 dir/mail/".$_SESSION[lastuserid]."/files/in";
exec("$ex &");

It works fine when I run on my computer (Win) but when I try to run it from server (Lin):
SAFE MODE Restriction in effect. The script whose uid is 512 is not allowed to access pescas/mail/84 owned by uid 48 in /var/www/html/pescas/newuserjn.php on line 47.

Is there any way to create this sub-dir? Can I change the UID???
User avatar
Elmseeker
Forum Contributor
Posts: 132
Joined: Sun Dec 22, 2002 5:48 am
Location: Worcester, MA

Post by Elmseeker »

If you're root you can put bot 512 and 48 into a group in /etc/groups then chown -R :group# pescas/mail/84
Post Reply