GetSimple Support Forum

Full Version: Default folder permission is 700, created from File Manager (SuPHP)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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!
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.
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!
is this a folder that you created within uploads from the "create folder" link at the top of upload.php?
Yes, I used GS File Manager to create folders, using that link at the top.
ok, i've added it to the issue...thanks for pointing it out - http://code.google.com/p/get-simple-cms/...ail?id=229
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
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).
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.