php exec()
Hi Guys,Here is what I am trying to do.
I have a script which creates a new account via cPanel. I then want to copy certain files from a non-public folder on another account on the server - to the new account that I just created. I can do this fine, using php's copy() function. However, when the files are copied over, they have incorrect group value. They should be owned by 'username' but for some reason they are owned by '99'??
So I thought that php exec() function could sort this out. So I tired using the following:
PHP Code:
exec("chown username:usename /home/username/public_html/file.php");
PHP Code:
exec("ls -lt");
I think I may need root permissions to do chown, but it is not possible in my script as is will cause too much of a security risk..Is there any alternative solutions I can use?