Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Coppermine creating files with 000 access  (Read 4193 times)

0 Members and 1 Guest are viewing this topic.

Cedron

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Coppermine creating files with 000 access
« on: November 25, 2003, 10:24:58 pm »

When coppermine create a new folder for an album and a new image, it is creating that folder or image with CHMOD permissions of 000 and the owner as "root". Since no one owns the file I cannot even CHMOD it to change it manually. Since no one has permissions to even read the file, I cannot even view it on the site.

I am running Nuke 6.5 (Nuke Cops Bundle) and have a brand new install of cpg1.2 rc2 nuke version. I did not have any coppermine installed before this version. And ideas?
Logged

Cedron

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Coppermine creating files with 000 access
« Reply #1 on: November 25, 2003, 10:31:40 pm »

I don't know if this helps or not, but here are the two settings from in Coppermine:

Default mode for directories     0755
Default mode for pictures        0644

I did not touch these. They are the defualt values from a fresh install.

These are NOT what Coppermine is doing. Actually the system is creating the files with NO permissions (000). And I am not even set as the owner of the file.
Logged

Cedron

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Coppermine creating files with 000 access
« Reply #2 on: November 26, 2003, 02:53:06 pm »

Nobody is answering me, so I am still trying to figure it out. Although those are the default settings, I am going to try changing them to remove the 0 at the beginning to see if that will solve the problem. I'll let you guys know how it goes.

Meanwhile, WHY does coppermine set the ownership to noone (in my case "root"). I have never seen a script create a folder with no permissions. Does anyone have an idea how to mod the script to set the ownership to me instead of "root"?
Logged

Cedron

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Coppermine creating files with 000 access
« Reply #3 on: November 26, 2003, 03:04:54 pm »

Alright, that did not work, although I learned something. After some more reading on CHMOD, I now understand that the leading 0 is because of passing it as an octal value.

Okay, so I am stumped again. Why is coppermine creating the files and folders with no permissions? Can anyone help?
Logged

Cedron

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Coppermine creating files with 000 access
« Reply #4 on: November 26, 2003, 03:34:41 pm »

Here's more information. Since the folder was created with no permissions, if I try to upload a new picture I get:

Failed to create directory modules/coppermine/albums/userpics/10003

I have checked debug mode and Safe Mode is not on:

Directive Local Value Master Value
safe_mode Off Off
safe_mode_exec_dir no value no value
safe_mode_gid Off Off
safe_mode_include_dir no value no value
safe_mode_exec_dir no value no value
sql.safe_mode Off Off
disable_functions no value no value
file_uploads On On
include_path .:/usr/local/lib/php .:/usr/local/lib/php
open_basedir no value no value
Logged

gtroll

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 618
    • CPG-Nuke
Coppermine creating files with 000 access
« Reply #5 on: November 26, 2003, 08:20:52 pm »

try this:
in db_input.php
change:
               
Code: [Select]
mkdir($dest_dir, octdec($CONFIG['default_dir_mode']));
into:
               
Code: [Select]
mkdir($dest_dir, $CONFIG['default_dir_mode']);
Pages: [1]   Go Up
 

Page created in 0.036 seconds with 19 queries.