0

I really need an Apache server to run PHP to be able to write files in one directory. However, after hours of streaming commands over SSH into the server - nothing has shown any sign of helping at all.

I have copied over the code from the Apache file and run it under root in order to verify that the code works; there is no question of this. The problem, however, is that an executing PHP file cannot, under any under any circumstances, write to a file.

I've looked at this, I've looked at this, nothing whatsoever is even vaguely useful.

The script (whoami) runs as Apache. Apache owns the file that it is trying to write to. Apahce owns the folder it is trying to write to. (Think: apache:apache). Permissions are 750. Only root can write to the file. I even tried root:apache. No dice.

This project is dead in the water until this starts to work I'll gladly listen to literally anything literally anyone says at this point.

Thanks for any help!

Community
  • 1
  • 1
user1833028
  • 865
  • 1
  • 9
  • 18
  • Well, post that php code, post your paths and the file permissions. Als tell us about all those commands you streamed over ssh. – arkascha Apr 26 '14 at 11:11

1 Answers1

0

Possibly a silly question, but did you make sure you have sufficient permissions for the file you are executing, the folder you intend to write to, and also the necessary permissions for the apache file???

And I think 750 is r-x, i.e. no write permission!!

Differences between CHMOD 755 vs 750 permissions set

Community
  • 1
  • 1
Hektor
  • 1,845
  • 15
  • 19