Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Can't Change ownership of symlink



On Wednesday 27 June 2007 18:31:07 Dave Gutteridge wrote:
> What I did to solve it was like what was suggested before, but with
> slightly different permission parameters:
> chmod 777 /home/dave
>
> It works, but it feels a little funny to make my home directory so wide
> open.
>
> I'd like to keep my web_sites directory in my /home/dave directory for
> backup purposes.
>
> Is it bad that my /home/dave directory has 777 permissions?
>
> Is there a better way to set up the permissions?

Yes, using 777 permissions is a bad idea.  755 should work:
	chmod 755 /home/dave

If your permissions are not correct on some of your website directories or 
files, here is how to fix them recursively:
	find /home/dave/web_sites -type d -exec chmod 755 {} \;
	find /home/dave/web_sites -type f -exec chmod 644 {} \;

There is no need to change the owner or group unless you want to restrict 
access to only the web server
	chown dave:www-data /home/dave/web_sites
	chmod 750 /home/dave/web_sites
or have a directory that the web server needs write access to.
	chown dave:www-data /home/dave/web_sites/s1/trunk/data/templates_c
	chmod 2770 /home/dave/web_sites/s1/trunk/data/templates_c

BTW, the user and group that Apache runs under is defined in the configuration 
file.
	grep '\(^User\|^Group\)' /etc/apache2/apache2.conf

Cheers, Travis


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links