I have installed Centos5, installed an internet server and hang up virtual host. The host is virtually setup such as this:

1: adduser user1

2. mkdir -p /home/user1/public_html/domain1.com/{public,private,log,cgi-bin,backup}

3. chmod -R 755 /home/user1/public_html/


<VirtualHost *:80>
#Blah blah blah
  DocumentRoot /home/user1/public_html/domain1.com/public
#Blah blah blah

So apache can ready your directory all right but has problems uploading files since the permission is refused. The scripting language is PHP. How do i allow file uploads without making everything 777 permssion?


upload files somewhere other then your docroot

chown your directory to complement Apache's set up username/groupname, and appearance where PHP is putting its uploads

Apache's user/group are based on the User and Group .conf options, and PHP's upload dir is per the upload_tmp_dir .ini option.

make all folders 755 and alter the dog owner towards the user who's running apache. Usually in Centos ought to be httpd