How to allow php scripts in one domain access/move files in another?

darksky

Member
Mar 12, 2013
15
0
1
cPanel Access Level
Root Administrator
I've got 2 web sites - well, one is a subdomain (forum.) of the main (www.) site. But they're in separate /home folders on the server.

I'd like to have some custom scripts I have in my forum.domain.com folder be able to edit and move files in my www.domain.com folder.

Right now, I have to FTP in to the www domain, set the folders or files to 777, run my scripts, then change them back to 755 (for folders) and 644 (for files). Lots of hassle, and obviously not the safest method.

:confused:
 

quietFinn

Well-Known Member
Feb 4, 2006
2,041
551
493
Finland
cPanel Access Level
Root Administrator
Anyone? Is there any cPanel setting that will allow scripts in one domain access to files in another?
No, there is not.

You might get an answer if you 1st tell if you are running suPHP, or is PHP running as an Apache module.
In the latter case it is very easy to implement.
 

electric

Well-Known Member
Nov 5, 2001
790
11
318

darksky

Member
Mar 12, 2013
15
0
1
cPanel Access Level
Root Administrator
Well sure, as root you can do anything. ;)
WEll, *I* can't do anything, I'm a linux idiot :) How would one go about it? I don't want to CHANGE the user in the www folder, because I don't want any scripts in the www part of it not be able to run properly. I just want scripts in the forum.domain.com folder able to access/move/edit files in the www.domain.com folder.

Right now I have to change perms in on the www.domain.com files/folders to 777 to do use the scripts, then change them back (a hassle).