Welcome, Guest. Please Login or Register.
May 17, 2025, 07:45:27 PM
Home Help Search Log in Register
News: If you are still using YaBB SE, please consider upgrading to SMF as soon as possible.

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 412 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.129 seconds with 20 queries.