Answer the question
In order to leave comments, you need to log in
How do I upload files to a site hosted by a different user?
Good afternoon!
I have SSD and HDD drives installed on my server. The OS is installed on an SSD. There are 2 users ssd and hdd. The first saves all data on the SSD, the second on the HDD. There are 2 sites that run on Apache (PHP 5.6.40):
site.ru - user: ssd , group: ssd
dw.site.ru - user: hdd , group: hdd
Please tell me how to access dw files. site.ru from site.ru ?
I tried to disable and configure the paths in open_basedir, but nothing happened. Maybe set it up wrong. I tried to add the files of both sites to the same group, also there is no result. Verification was done through file_exists(path_to_dw.site.ru).
Answer the question
In order to leave comments, you need to log in
In short, I implemented it like this:
1. In the Apache config of the site.ru site, I added the path of the second site through open_basedir:
<IfModule php5_module>
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -f [email protected]"
php_admin_value upload_tmp_dir "/var/www/ssd/data/mod-tmp"
php_admin_value session.save_path "/var/www/ssd/data/mod-tmp"
php_admin_value open_basedir "/var/www/ssd/data:/var/www/hdd/data/www/dw.site.ru"
</IfModule>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question