Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: groyk on June 21, 2011, 10:29:04 PM
-
Hi guys
I am having troubles creating folders with right chmod settings.
I use: mkdir(folder, 0777, true);
But I end up both a folder that I can only create, edit, delete with pho.
Folder is created in ibays file directory tree. Please help.
-
Isn't that what you are after? AFAICT the only thing you can do with a folder is to create, delete or modify it.
-
I want to be able to create, modify, delete in samba share as well.
-
I want to be able to create, modify, delete in samba share as well.
You should be able to do so, but that depends on the right defined for the ibay in which the folder is located, you can not make folders below an ibay accessible to a broader scope AFAIK.
-
Hi Cactus
I-bay name: w-erp
Write: Group
Read: Everyone
Folders created like this mkdir($root . '/w-erp/files/testdir', 0777, true);
But when I check settings in shell dir has following chmod: dr----x--t
Maybe Chmod has to be 764 or 775 in order to work?
-
Creating a folder with permissions 0777 is *always* a security problem, and is not supported on SME server.
Believe me, you don't need it.
-
Got the solution
mkdir($dir);
chmod($dir, $mode);
chgrp($dir, $group);
-
Got the solution
mkdir($dir);
chmod($dir, $mode);
chgrp($dir, $group);
I am not sure if the settings you set here will survive a configuration change to your ibay. A configuration change will reset all files and folders to the default permissions as enforced by the ibay the files and folders are in and reset them to the following values:
wr-admin-rd-group:
fileperm = 0640
dirperm = 02750
wr-group-rd-group:
fileperm = 0660
dirperm = 02770
wr-group-rd-everyone:
fileperm = 0664
dirperm = 02775
-
I know.
This setup has to be reconfigured if ibays permissions are changed.