hot to set default file permission / owner / group - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: hot to set default file permission / owner / group (/showthread.php?tid=8545) |
hot to set default file permission / owner / group - El Forum - 05-21-2008 [eluser]vile[/eluser] can anyone tell me how to set the default permission/ owner and group, whenever i create new file using a script. thanks example: Quote:mkdir('test/dirc/') hot to set default file permission / owner / group - El Forum - 05-22-2008 [eluser]mironcho[/eluser] Hi vile, you can set default permissions with umask (but you have to set it every time when your application runs and before uploading something) or change permission/group of some file later with chmod and chown (using chown is not always possible/allowed). In addition, you can set file permissions while creating directory with mkdir by setting it's second argument: Code: mkdir(’test/dirc/’, 0775); hot to set default file permission / owner / group - El Forum - 05-22-2008 [eluser]vile[/eluser] thanks for you reply. yes i tried to set umask now my problem is the owner and group of the file. chown / chgrp is not working. however i tried to change httpd.conf user and group. i set it to apache and dev. it worked but still got problem. i cant use phpmyadmin... is there away other way to fix this? thanks hot to set default file permission / owner / group - El Forum - 05-22-2008 [eluser]Michael Wales[/eluser] It sounds like your host has a limitation on what scripts can accomplish with regards to the filesystem. hot to set default file permission / owner / group - El Forum - 05-22-2008 [eluser]vile[/eluser] this is the error message Quote:SAFE MODE Restriction in effect. The script whose uid is 48 is not allowed to access /home/chat/codeigniter/chat/agents/rex/client_xml/ owned by uid 99 uid 48 is apache uid 99 is nobody I set php.ini safe mode = off. it didnt work i also tried to disable safe mode in htaccess. still no luck. is it normal to run apache under nobody and user id set to #-1? if not, who should run apache and under what group? |