Allow Apache/PHP a read/write access to a mounted directory -


We have scripts websites running with apache httpd and php server I have a certain directory of Windows Server on the server Mt. As if / mnt / some_directory / says that I can browse this directory with both WinSCP or SSH, using my own user account

I also have the following in SSH can perform:.

  php -r "print_r (file_get_contents ( '/mnt/some_directory/file_name.txt'));"  

and see the contents of that file.

In order to import it from the database used in the website, we need to read a file and parse from that directory. But when a file_get_contents on a fopen or website we get an error not allowed.

I have limited access to web servers (and limited knowledge of * nix and Apache configurations), but the administrator is believed to have this lack of knowledge to solve this apparently and I The solution is to be solved, that's why I'm asking here.

Did the administrator go to establish ownership of the group and mounted directory "Apache", which is the user, the httpd process is running but no help was found.

As far as I know is denied by access to files outside Vebroot default it sets a Directory directive to httpd.conf / mnt / some_directory / is To be enough? Or should anything be done?

Our team had the same issue, to mount my team-matte option Context was able to resolve it.

We will be able to reach those who are using the following format for mounting in Linux shared folders window Apache:

  mount-V-T Siaifs & Lt; // $ Hostname / $ (Windows Shared DIN) & gt; & Lt; Mount directory & gt; -o user name = "& lt; username & gt;", password = & lt; Password & gt ;, domain = & lt; Domain Name & gt ;, iocharset = UTF8, file_mode = 0777, dir_mode = 0777, reference = "system_u: object_r: httpd_sys_content_t: s0"  

For example:

  -V -t CIFS mount //192.168.1.19/sample_dir / MNT / mount_dir -o username = "admin", password = Adminpwd, domain = MIINTER, iocharset = UTF8, file_mode = 0777, dir_mode = 0777, Context = "system_u: object_r: httpd_sys_content_t: s0"  

Comments