Posts: 25
Threads: 9
Joined: Jul 2010
Hi, I have installed SuPHP on my local Ubuntu PC, everything works perfectly, except that when a new folder is created from the File Manager, the permission is set to 700 by default, instead of 755 which is required so it can be read by the Apache Server.
I tried changing
Code:
# Set override CHMOD mode
define('GSCHMOD', 0777);
to
Code:
# Set override CHMOD mode
define('GSCHMOD', 0755);
but didn't do the trick. Do you know where I can change the chmod settings in GS?
Thanks!
Posts: 1,848
Threads: 86
Joined: Aug 2009
Hmm, I see that the uplaod files have hardcoded CHMOD of 0644 in them. I've added an issue to make these read the gsconfig value if set, but that still doesnt explain how your files are being set to 0700 instead.
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 25
Threads: 9
Joined: Jul 2010
Just to clarify, files are set to 644 correctly, only the folder is set to 700 for some reason. Not sure if it's suPHP related or GS related.
Thanks!
Posts: 1,848
Threads: 86
Joined: Aug 2009
is this a folder that you created within uploads from the "create folder" link at the top of upload.php?
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 25
Threads: 9
Joined: Jul 2010
Yes, I used GS File Manager to create folders, using that link at the top.
Posts: 1,848
Threads: 86
Joined: Aug 2009
ok, i've added it to the issue...thanks for pointing it out -
http://code.google.com/p/get-simple-cms/...ail?id=229
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 30
Threads: 3
Joined: Dec 2010
phpsns Wrote:Hi, I have installed SuPHP on my local Ubuntu PC, everything works perfectly, except that when a new folder is created from the File Manager, the permission is set to 700 by default, instead of 755 which is required so it can be read by the Apache Server.
After a quick read through the SuPHP docs, what do you have in its config file for the allow_directory_group_writeable, allow_directoy_others_writeable (I suspect that's a typo and it should be allow_directory_others_writeable) and umask settings?
Anthony
Posts: 25
Threads: 9
Joined: Jul 2010
Vulch Wrote:After a quick read through the SuPHP docs, what do you have in its config file for the allow_directory_group_writeable, allow_directoy_others_writeable (I suspect that's a typo and it should be allow_directory_others_writeable) and umask settings?
Anthony
It's the same problem, regardless if these settings are changed to "true" or "false" (of course, I have restarted Apache so it will take affect).
Posts: 25
Threads: 9
Joined: Jul 2010
2011-09-05, 01:44:33
(This post was last modified: 2011-09-05, 01:45:30 by Horse riding.)
Regarding to this problem, just in case anybody needs it, I have solved by:
Code:
### 1. Open file
admin/upload.php
### 2. Around line 84 find
if (mkdir($path . $cleanname, $chmod_value)) {
### 3. Below add
chmod($path . $cleanname, $chmod_value);
I am using PHP Version 5.3.3-1ubuntu9.5, this might be a bug in this PHP version for not able to set file permission correctly by the mkdir() function, but forcing via chmod() once again solved the problem.