Since upgrading to 1.2 uploads are given 600 permissions
Since upgrading to 1.2 uploads are given 600 permissions
I have three installations of CMSMS that were upgraded to 1.2. All three are now giving permissions to uploads of 600.
umask is set to 022 and tests as read write, read, read
config.php has upload permissions set to 644.
When I ftp files in, they are given 644 permissions.
What could explain CMSMS all of a sudden giving permissions to uploads of 600? And more importantly how might I fix this?
umask is set to 022 and tests as read write, read, read
config.php has upload permissions set to 644.
When I ftp files in, they are given 644 permissions.
What could explain CMSMS all of a sudden giving permissions to uploads of 600? And more importantly how might I fix this?
Last edited by cnymike on Mon Nov 05, 2007 10:44 pm, edited 1 time in total.
Re: Since upgrading to 1.2 uploads are given 600 permissions
I have the same problem!
But after a new installation and only with the new filemanager.
The uploads are given 600 permissions.
With the imagemanager everything works fine!
Any clue??
Thanks!!
Greetings
Klaus
But after a new installation and only with the new filemanager.
The uploads are given 600 permissions.
With the imagemanager everything works fine!
Any clue??
Thanks!!
Greetings
Klaus
Re: Since upgrading to 1.2 uploads are given 600 permissions
I am having this issue as well. Can't seem to find a fix yet.
Re: Since upgrading to 1.2 uploads are given 600 permissions
Warning - I'm not a coder for real
, but you can try this:
Add
AFTER line 104 in action.upload.php

Add
Code: Select all
chmod($thispath, octdec('0'.$config['default_upload_permission']));
Re: Since upgrading to 1.2 uploads are given 600 permissions
have just tried this as mentioned here - it has not been successful - permissions are still 600 on uploaded files - so code after the add looks like as follows (from 102 to 112) - is this what we were supposed to do cyberman, or am I putting it in the wrong place?
Thanks!
Code: Select all
} else {
if (trim($_FILES[$id."file_".$i]["name"])=="") continue;
$thispath=$this->Slash($fullpath,$_FILES[$id."file_".$i]["name"]);
chmod($thispath, octdec('0'.$config['default_upload_permission']));
if (move_uploaded_file($_FILES[$id."file_".$i]["tmp_name"],$thispath)) {
$messages.=$_FILES[$id."file_".$i]["name"]." ".$this->Lang("uploadsuccess")."<br/>";
} else {
$errors.=$_FILES[$id."file_".$i]["name"]." ".$this->Lang("uploadfail")."<br/>";
}
}
}
Re: Since upgrading to 1.2 uploads are given 600 permissions
I wonder if more people are experiencing this and don't realize that permissions have changed?
Dev team...is this a bug?
Dev team...is this a bug?
Re: Since upgrading to 1.2 uploads are given 600 permissions
Yes I have the same problem. Everything OK until upgrade to 1.2. Also new install has the same problem. This is 1 of 3rd threads on the issue.cnymike wrote: I wonder if more people are experiencing this and don't realize that permissions have changed?
Dev team...is this a bug?
Mark
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Since upgrading to 1.2 uploads are given 600 permissions
Okay, I briefly looked at this issue and there is a problem (but it's not as severe as you think).
a) File Manager isn't giving out the truth about permissions (checking the files with your ftp client
will tell you the real story). I'll fix this one soon
b) There seems to be some inconsistencies with permissions on uploaded files between the various modules, etc.
I'll check into this soon.
[correction]
You are correct, they are getting 600 permission.
i'm looking into it.
a) File Manager isn't giving out the truth about permissions (checking the files with your ftp client
will tell you the real story). I'll fix this one soon
b) There seems to be some inconsistencies with permissions on uploaded files between the various modules, etc.
I'll check into this soon.
[correction]
You are correct, they are getting 600 permission.
i'm looking into it.
Last edited by calguy1000 on Wed Nov 14, 2007 4:05 pm, edited 1 time in total.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Since upgrading to 1.2 uploads are given 600 permissions
Thank you for your attention to this matter.
May not be "severe" but it's put a screeching halt to user uploads being viewable by visitors to the sties since permissions must now be manually changed to 644 from 600
May not be "severe" but it's put a screeching halt to user uploads being viewable by visitors to the sties since permissions must now be manually changed to 644 from 600
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Since upgrading to 1.2 uploads are given 600 permissions
Okay, this issue is not unique to CMS Made simple, searching through google found hundreds of references to this issue.
The problem is the 'umask' of the parent process to apache (or one of those processes anyways) is 077 which causes files to be created as 600. The move_uploaded_file php function preserves that permission. We use that function everywhere.
Interestingly, the ImageManager does not use this function, it uses copy() which sets the file permission properly.
To solve this problem once and for all we will have to change ALL of the modules that allow uploading files (currently there are alot of them).
dammit dammit dammit!!!
The problem is the 'umask' of the parent process to apache (or one of those processes anyways) is 077 which causes files to be created as 600. The move_uploaded_file php function preserves that permission. We use that function everywhere.
Interestingly, the ImageManager does not use this function, it uses copy() which sets the file permission properly.
To solve this problem once and for all we will have to change ALL of the modules that allow uploading files (currently there are alot of them).
dammit dammit dammit!!!
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Since upgrading to 1.2 uploads are given 600 permissions
Is this sudden "thing" due to an Apace upgrade or what exactly is the culprit?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Since upgrading to 1.2 uploads are given 600 permissions
Well, it's sudden because the file manager has been replaced.
The old file manager used copy() I think..... which took the umask into cosideration. Uploads module and FrontEndUsers do similar things.
The Album module uses the move_uploaded_file function, as does CompanyDirectory, and (as of 2.6) News, and the New file manager. so that would explain some of the difficulty with uploads people have been having with the album module.
I've written and committed a 'cms_move_uploaded_file' function which will call move_upload_files and then chmod the file to the permission specified in the config file. I've converted the FileManager module, News, CompanyDirectory to use this new function now, and there'll be a CMS Made Simple 1.2.1 coming out soon.
The old file manager used copy() I think..... which took the umask into cosideration. Uploads module and FrontEndUsers do similar things.
The Album module uses the move_uploaded_file function, as does CompanyDirectory, and (as of 2.6) News, and the New file manager. so that would explain some of the difficulty with uploads people have been having with the album module.
I've written and committed a 'cms_move_uploaded_file' function which will call move_upload_files and then chmod the file to the permission specified in the config file. I've converted the FileManager module, News, CompanyDirectory to use this new function now, and there'll be a CMS Made Simple 1.2.1 coming out soon.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Since upgrading to 1.2 uploads are given 600 permissions
I've also reported as a "bug" the fact the FileManager has a confusing mix of upper and lower case usage as concerns the dropdown menu and the actual directory names. eg: "File" in dropdown menu versus "file" directory name and similarly with images, flash, media.
This caused me to have to move hundreds of files from "File" directory to "file" directory to keep up with the change that, at some point, the changed FileManager imposed upon CMSMS.
This caused me to have to move hundreds of files from "File" directory to "file" directory to keep up with the change that, at some point, the changed FileManager imposed upon CMSMS.
Re: Since upgrading to 1.2 uploads are given 600 permissions
Hi everyone,
kindly asking: is there anything new to this issue?
kindly asking: is there anything new to this issue?
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Since upgrading to 1.2 uploads are given 600 permissions
Interestingly, my research tells me that this is not a CMS issue. it's common to many packages. it's caused by certain web server configurations. Anyways, in 1.2.1 we've made some changes to 'work around' this issue.
I'm just trying to get a bit more testing done before we release it.
I'm just trying to get a bit more testing done before we release it.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.