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?

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.