T
tcreswick
Guest
I have a php file inside %domain%/httpdocs which is attempting to access files in a custom folder one level up; the exact php code is:
I have created a vhost.conf file which contains the following:
I have run the
command and restarted the apache service, but I am seeing the following PHP error:
For testing purposes, I have recursively set chmod permissions to 777 on the folder, i.e.
I appreciate that once this is working properly, these permissions should be set to 755 or similar.
Currently the "domain.com" folder listing is as follows:
You will note that the owner of the "files" folder is set to root at the moment. I have tried setting this to "tsfiles" (the domain user), but this hasn't worked either.
What am I missing here?
Many thanks in advance
Code:
$lines = file('/var/www/vhosts/domain.com/files/auth.txt');
I have created a vhost.conf file which contains the following:
Code:
<Directory /var/www/vhosts/domain.com/httpdocs>
php_admin_flag engine on
php_admin_flag safe_mode off
php_admin_value open_basedir "/var/www/vhosts/domain.com/httpdocs:/var/www/vhosts/domain.com/files:/tmp:."
</Directory>
I have run the
Code:
/usr/local/psa/admin/bin/websrvmng -a
Code:
Warning: file(/var/www/vhosts/domain.com/files/auth.txt) [function.file]: failed to open stream: Permission denied in /var/www/vhosts/domain.com/httpdocs/inc/auth.php on line 56
For testing purposes, I have recursively set chmod permissions to 777 on the folder, i.e.
Code:
chmod -R 777 /var/www/vhosts/domain.com/files
I appreciate that once this is working properly, these permissions should be set to 755 or similar.
Currently the "domain.com" folder listing is as follows:
Code:
drwxr-x--- 5 tsfiles psaserv 4096 Oct 16 12:14 anon_ftp
drwxr-xr-x 2 root psaserv 4096 Oct 16 12:14 bin
drwxr-x--- 3 tsfiles psaserv 4096 Oct 16 12:14 cgi-bin
drwxr-x--- 2 root psaserv 4096 Oct 16 14:03 conf
drwxr-xr-x 2 root psaserv 4096 Oct 16 12:14 error_docs
drwxrwxrwx 4 root psaserv 4096 Oct 16 13:45 files
drwxr-x--- 8 tsfiles psaserv 4096 Oct 16 12:38 httpdocs
drwxr-x--- 2 tsfiles psaserv 4096 Oct 16 12:17 httpsdocs
drwxr-x--- 2 root psaserv 4096 Oct 16 12:14 pd
drwx------ 2 tsfiles root 4096 Oct 16 12:14 private
dr-xr-x--- 7 root psaserv 4096 Oct 16 12:14 statistics
drwxr-xr-x 2 root psaserv 4096 Oct 16 12:14 subdomains
drwxr-xr-x 2 root psaserv 4096 Oct 16 12:14 web_users
You will note that the owner of the "files" folder is set to root at the moment. I have tried setting this to "tsfiles" (the domain user), but this hasn't worked either.
What am I missing here?
Many thanks in advance