Secure hosted files

Operating System: Ubuntu Server 10.04
Web Server: apache2
As apache2 accesses file as user: www-data and group: www-data, First change the owner using following command:
chown www-data: path/file
and then to making a particular file only readable only to user:www-data
chmod 500 path/file
For scripts and images or logo use 500 (r _ x   _ _ _   _ _ _)
For images which you only want to save but don't want them to accessible to users/www-data, use
300 (_ w x   _ _ _   _ _ _)

Remember to give necessary access to the user which updates the hosted files. Another alternative to secure files is Apache Directives and Containers in http.conf of apache server.

Hope this helps
Cheers and try hosting at Linode.
Monish


Hope this helps
Cheers and try hosting at Linode.

No comments:

Post a Comment