LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2005, 08:00 PM   #1
spoody_goon
Member
 
Registered: Sep 2003
Location: Michigan USA
Distribution: Mandrake, DamnSmallLinux, VectorLinux
Posts: 416

Rep: Reputation: 30
php permissions default setup


I am working on a open source project and I am discovering that permissions are my biggest source of errors. I am asking for opinions of what is the best way to setup a php program. For example

text files that need read/write to ->666

php files that need to open/read/write other files -> 666

directories -> 755

static html and text files -> 664

Do you think that this is the correct set up?
Is it common to have a "first run" code to check the permissions of the files?
Does the permissions change when you are moving the files back and forth between windoz and Linux?

Thanks
 
Old 09-30-2005, 01:08 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
It depends what you are trying to do but I doubt having files writable by everyone on the system is what you are looking for. Try to limit the permissions to just the users that need access.
 
Old 09-30-2005, 03:15 PM   #3
spoody_goon
Member
 
Registered: Sep 2003
Location: Michigan USA
Distribution: Mandrake, DamnSmallLinux, VectorLinux
Posts: 416

Original Poster
Rep: Reputation: 30
Hi david_ross,
Thanks for the response. I have discovered that the directories need to executable by everyone in order for the program to create text files via fopen. The server (not mine) is a Red Hat server and used the home directory for web files instead of /var/www like most. I wonder if that is the problem because apache is not the uid of the files.

I don't have these problems on my test server, aka my home pc, but because I wan't to release this program as an open source project I need to have it work in as many environments as possible.
Thanks
 
  


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
default permissions crane Linux - Security 1 01-01-2005 12:36 PM
Oh no! Default permissions? Loiosh Fedora 5 12-17-2004 11:35 PM
default permissions skel Linux - Security 1 12-14-2004 06:27 PM
what are default permissions for /etc timsch75 Slackware 2 08-06-2004 10:34 PM
what are the default permissions figmentium Linux - Newbie 4 12-25-2003 06:50 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:07 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