PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
shawnzhou888
Forum Newbie
Posts: 6 Joined: Wed Jun 04, 2003 2:29 pm
Post
by shawnzhou888 » Wed Jun 04, 2003 2:40 pm
I tried to access the files in the linux root directory but failed. Does the Apache server must to run as root for enabling that?
volka
DevNet Evangelist
Posts: 8391 Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger
Post
by volka » Wed Jun 04, 2003 2:56 pm
depends on the file permissions.
what do you mean with access ?
a directory listing or reading file-contents?
shawnzhou888
Forum Newbie
Posts: 6 Joined: Wed Jun 04, 2003 2:29 pm
Post
by shawnzhou888 » Wed Jun 04, 2003 3:09 pm
I set a simple file readable for all. Like: chmod +r a.ini . It's under /root. But from PHP the file cannot be opened.
nielsene
DevNet Resident
Posts: 1834 Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA
Post
by nielsene » Wed Jun 04, 2003 3:17 pm
Try checking phpinfo() regarding the "safe mode" settings? (long shot, I know)
Stoker
Forum Regular
Posts: 782 Joined: Thu Jan 23, 2003 9:45 pm
Location: SWNY
Contact:
Post
by Stoker » Wed Jun 04, 2003 3:28 pm
it is a big difference of "the root directory" / and the directory /root
/ is accessible by anyone
/root is in most cases (default distro setups) not accssible by by anyone else than root
shawnzhou888
Forum Newbie
Posts: 6 Joined: Wed Jun 04, 2003 2:29 pm
Post
by shawnzhou888 » Wed Jun 04, 2003 3:49 pm
Its Safe mode is off. Sounds like the only solution is to run apache as root.