Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

File permissions for image files


hankfrid

Recommended Posts

Can someone please tell me within recent snapshots (mid May2003 and forward) where exactly the file permissions are set for when you add a new product via Admin and select an image from your PC hard drive to be uploaded to the "Images" folder?

 

Thank you.

 

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Link to comment
Share on other sites

Hank....

 

I have looked to find out for sure but, I would look in the functions/general.php file to start.

Link to comment
Share on other sites

I looked in the functions/general.php and didn't really find anything. I saw a section that seems to try and determine file type and numeric values that would be added together to achieve file permissions, but nothing that specified what the permission would be for an image file.

 

In mid March, a new module "upload" was added and it seems to set a default permission to 777. The code is:

 

class upload {

   var $file, $filename, $destination, $permissions, $extensions, $tmp_filename;



   function upload($file = '', $destination = '', $permissions = '777', $extensions = '') {

     $this->set_file($file);

     $this->set_destination($destination);

     $this->set_permissions($permissions);

     $this->set_extensions($extensions);

 

then a little further down it has:

function set_permissions($permissions) {

     $this->permissions = octdec($permissions);

   }

 

This is all a little Greek to me. I would think that somewhere in categories.php would be the code to set the permissions. But I can't see it.

 

HankFrid

If I build it...they will come.

If I don't try to build it.....I will never know!

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...