Linux – create folder and files under User ownership in CakePHP

centoslinuxumask

When CakePHP create a new Folder or File, its always owned by nobody and is set to 0755 or 0644

and for so i cant run php in SuPHP mode under the cPanel server

to fix this i always run a Cron which set the normal permissions for the new created folders or files …

how can i make CakePHP to create the new Folders and Files under the ownership of the user who run the CakePHP

Note: all core files of CakePHP and its controllers are runing under the ownership of the user, only new uploaded or created folders or files are set to nobody!

Best Answer

Just a quick idea - how about mounting the directory on a separate filesystem with a fixed UID?

http://linux.die.net/man/8/mount