Jump to content

Can't access directory or file through php code


shane07

Recommended Posts

I have a weird kind of problem.

I uploaded all upload-directories through FTP which have 777 permissions and owner name 'abc'

This means I can access all of them through the codes.

But while creating files inside those full permitted directories, the compiler complains for access denied.

Meanwhile, a different directory is created with same name whose owner is 'apache' itself and the previous directory is lost.

Then I cannot change the permissions of that directory through FTP.

I don't if it is apache server's problem itself or not.

Or is it a way to define user while creating/editing/deleting files and directories through php code itself?

the owner will be "www-data" which is the owner that apache uses

 

This completely depends upon Apache's configuration. You can check who apache runs as by executing:

 

grep User /etc/apache2/httpd.conf

 

The path to your config file might also be different though.

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.