Welcome, Guest. Please Login or Register.
May 18, 2025, 02:20:22 AM
Home Help Search Log in Register
News: SMF is the next generation in forum software, almost completely re-written from the ground up, make sure you don't fall for cheap imitations that suffer from feature bloat!

YaBB SE Community  |  English User Help  |  English Help  |  Where is a good place to set umask? « previous next »
Pages: [1] Reply Ignore Print
Author Topic: Where is a good place to set umask?  (Read 414 times)
Neil Darlow
Noobie
*
Posts: 9


I'm a llama!

WWW
Where is a good place to set umask?
« on: January 17, 2002, 08:15:34 AM »
Reply with quote

Hi,

I'm running YSE on a FreeBSD system. It installed like a dream, nice work people.

I like to tighten the permissions of directories and files for any web-based application because I have a small number of shell accounts on the system and I don't want database passwords etc. casually snooped at.

The scheme I use is to give ownership of directories and files, which must be written by the application, to the webserver user. I then remove the group writable and world readable/writable permissions for these directories and files.

This is fine for pre-existing files but for those created after the install it is necessary to modify the permissions that are used when a file is created. I usually do this with a strategically placed umask(0137) call in some common include or require file.

In the case of YSE, I have added the umask call to the top of Subs.php. Is this the optimum place for me to place it? :)
« Last Edit: January 17, 2002, 08:18:25 AM by Neil Darlow » Logged
Pages: [1] Reply Ignore Print 
YaBB SE Community  |  English User Help  |  English Help  |  Where is a good place to set umask? « previous - next »
 


Powered by MySQL Powered by PHP YaBB SE Community | Powered by YaBB SE
© 2001-2003, YaBB SE Dev Team. All Rights Reserved.
SMF 2.1.4 © 2023, Simple Machines
Valid XHTML 1.0! Valid CSS

Page created in 0.034 seconds with 21 queries.