Author Topic: 4images security problem?  (Read 6620 times)

0 Members and 1 Guest are viewing this topic.

Offline vibber

  • Pre-Newbie
  • Posts: 8
    • View Profile
4images security problem?
« on: May 05, 2002, 07:53:00 PM »
Everywhere I read about php and security I am told that setting a dir and the files in it to chmod 777 is a *major* security risk as an attacker can then put any file in the dir and execute it.

4images creates files and dirs that are chmod 777 and it seems very unsafe. Just because the script checks for file types so that no one can upload e.g. a PHP script *via 4images*, what prevents a hacker from finding *another way* in and putting a file inside the media dirs and execute it?

I think it is revealing that through this whole web site, security issues are not discussed at all.
I would like to hear the developer's thoughts (in detail) regarding the security of putting this script on a server.

Offline fredfery

  • Pre-Newbie
  • Posts: 8
    • View Profile
    • http://www.webmaster-tools.tv/
Security concern on folders chmod 777
« Reply #1 on: October 04, 2002, 06:36:17 AM »
vibber posted this a while ago, I have some concerns too
can we have an answer
Frederci

vibber Posted: 06.05.2002, 03:53    Post subject: 4images security problem?

--------------------------------------------------------------------------------
 
Everywhere I read about php and security I am told that setting a dir and the files in it to chmod 777 is a *major* security risk as an attacker can then put any file in the dir and execute it.

4images creates files and dirs that are chmod 777 and it seems very unsafe. Just because the script checks for file types so that no one can upload e.g. a PHP script *via 4images*, what prevents a hacker from finding *another way* in and putting a file inside the media dirs and execute it?

I think it is revealing that through this whole web site, security issues are not discussed at all.
I would like to hear the developer's thoughts (in detail) regarding the security of putting this script on a server.

Offline Jan

  • Administrator
  • 4images Guru
  • *****
  • Posts: 5.024
    • View Profile
    • 4images - Image Gallery Management System
4images security problem?
« Reply #2 on: October 04, 2002, 08:29:15 AM »
See in "includes/constants.php":
Code: [Select]
define('CHMOD_FILES', 0666);
define('CHMOD_DIRS', 0777);


Change this if you want. This works for all directories and files created by 4images.

Jan
Your first three "must do" before you ask a question:
1. Forum rules
2. FAQ
3. Search