LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-04-2004, 12:17 PM   #1
Mikessu
Member
 
Registered: Sep 2003
Distribution: Gentoo, FreeBSD 5.1
Posts: 122

Rep: Reputation: 15
Prevent others from reading php source?


I have server-computer where are more than just one user. I'd like to use it for PHP and Postgresql development. Now I have following problem: I have php-files in my public_html directory and I'd like to prevent other users from seeing php-sources, because they can see database passwords from those files. If I deny access (chmod to 700) to public_html directory, then nobody will be able to read my pages from internet. How can I make it only deny computer-users to see php-sources and prevent them from entering my public_html-directory? I have set ftp chroot to home directory, but they can still see those files by using ssh.
 
Old 01-04-2004, 01:01 PM   #2
g-rod
Member
 
Registered: Dec 2003
Location: Long Island, NY USA
Distribution: RedHat, SUSE
Posts: 336

Rep: Reputation: 30
Put all of the password in one php file and have the other php files include that file. Change the owner of the file to apache and group apache. Then change that one files perms to 700.
 
Old 01-04-2004, 06:51 PM   #3
w0000422
Member
 
Registered: Dec 2003
Distribution: redhat linux 9.0
Posts: 60

Rep: Reputation: 15
i never think of that kind of question, it's good for my future reference, thks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reading mails using php shenil Linux - Newbie 4 05-28-2005 04:36 PM
some questions encounted during reading the source code qqrilxk Linux - Security 1 12-08-2004 09:23 PM
PHP not reading PHP_AUTH_USER slackwarefan Linux - Software 0 10-11-2004 06:41 PM
reading source? The_Insomniac Programming 4 07-22-2004 01:28 AM
reading kernel source code eshwar_ind Programming 4 06-02-2004 03:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration