nl2ttl wrote:chmod 755 www -R does the job.
I only have to do it every time I upload a file to the www dir. Is there a way to enable it automatically when I upload a file.
Ok this means that only the owner has read and write permission to the directory. If you set the directory, say as root, then root is the owner, then only root can write to the directory.
If you upload as a different user (sometimes using programs like ftp clients appear to the system as a different user, or "nobody"), this will be blocked, unless you revert to being the owner again.
The way I would do it is to have www directory permission as 775. This means that root and anybody in the right group (say www-data) has permission to write to the directory.... then make sure that all users and programs that need to have write access belong to this group....Does that help?