directory/file permissions

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

Post Reply
kippy
Forum Commoner
Posts: 84
Joined: Wed Jun 07, 2006 8:25 pm

directory/file permissions

Post by kippy »

I am creating a system for users to register and once they register a directory will be created with a specific stylesheet file inside. My concern is permissions for files and directories. What should I worry about and are there any suggestions on how to make this a more secure system?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

What's the purpose of the directory and this stylesheet? Why not point to a script that can generate on-demand whatever information is needed?
kippy
Forum Commoner
Posts: 84
Joined: Wed Jun 07, 2006 8:25 pm

Post by kippy »

basically I want people to sign up and have the ability to modify a stylesheet for their home page(s), etc.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

I would go one of two routes (both are virtually the same):

1. Change the apache config to parse CSS files with PHP (hint: .htaccess)

2. Point to a PHP file as your stylesheet. No one ever said a CSS <link/> tag had to point to a file ending in .CSS.

Either of those methods will be much easier than generating and maintaining a set of files per user.
kippy
Forum Commoner
Posts: 84
Joined: Wed Jun 07, 2006 8:25 pm

Post by kippy »

I think I like the sound of option number two. I can store the stylesheet variables in a db table and then have the style sheet use php. I think I can figure that option out. Thanks for the advice.
Post Reply