[thelist] Linux CHMOD

Bob Meetin bobm at dottedi.biz
Tue May 13 07:35:02 CDT 2008


I use hostgator for hosting my web sites, having run away from others 
where their rules/standards were creative. Hostgator once responded that 
755 for directories and 644 for files was in accordance with 
apache/security rules (is there really a rule); regardless it works with 
all my upload forms.  Every now/then I have to ftp a folder or files 
from another site, dadamail in that list and permissions are wrong, so I 
use a simple 'find' to fix to correct permissions.  I have it aliased in 
my .login.

alias fixf 'find . -type f -exec chmod 644 {} \;'
alias fixd 'find . -type d -exec chmod 755 {} \;'

So I'm lazy...


Raoul Snyman wrote:
> Hi,
>
>   
>> I still confuse the default user n group  created from php mkdir in my
>> fedora is 'apache'.
>>     
> PHP is run through Apache, and so runs as the "apache" user. This means
> that any uploads or directories created by PHP are done by the "apache"
> user
>> So if i want to chmod my directories to 755, then is it ok if i chown
>> those directories to apache
>>     




More information about the thelist mailing list