fixed: winix incorrectly used config options: upload_dirs_chmod and upload_files_chmod
added: to config: upload_group a group name for newly uploaded files (and created necessary directories in the file system) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@961 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -76,7 +76,7 @@ return true;
|
||||
|
||||
bool Upload::UploadSaveStaticFile(const Item & item, const std::wstring & tmp_filename)
|
||||
{
|
||||
if( !system->MakeFilePath(item, path, false, true, config->upload_dirs_chmod) )
|
||||
if( !system->MakeFilePath(item, path, false, true, config->upload_dirs_chmod, config->upload_group_int) )
|
||||
{
|
||||
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return false;
|
||||
@@ -84,7 +84,15 @@ bool Upload::UploadSaveStaticFile(const Item & item, const std::wstring & tmp_fi
|
||||
|
||||
if( RenameFile(tmp_filename, path) )
|
||||
{
|
||||
log << log1 << "Upload: uploaded a new file: " << path << logend;
|
||||
PT::WideToUTF8(path, patha);
|
||||
|
||||
if( !SetPriv(patha, config->upload_files_chmod, config->upload_group_int) )
|
||||
{
|
||||
cur->request->status = WINIX_ERR_PERMISSION_DENIED;
|
||||
return false;
|
||||
}
|
||||
|
||||
log << log2 << "Upload: uploaded a new file: " << path << logend;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user