View Single Post
  #3   (View Single Post)  
Old 27th September 2011
Carpetsmoker's Avatar
Carpetsmoker Carpetsmoker is offline
Real Name: Martin
Tcpdump Spy
 
Join Date: Apr 2008
Location: Netherlands
Posts: 2,243
Default

Eek! The evil chmod 777 rears it's ugly head!

Yes, chmod 777 will make your life easier, if you are *only* interested in making your life easier, I would recommend issuing chmod -R 777 / now Don't come back complaining about security issues though!

chmod 777 will make the file or directory writable by *everyone*. This includes accounts that are normally used only for system services such as apache, ftpd, ntpd, sendmail, bind, etc. The biggest reason these process run as a separate user and not root, is that this way they cannot files which they should not access. Such as /bin/ls or /etc/passwd ...
This means that if some 1337 haxx0r gains access to, for example, your sendmail through some vulnerability, he/she can only access/change a very limited number of files and (hopefully) the impact is limited.

So, in short I would recommend you never use chmod 777 unless you have a very clear picture of why it's 777 and not something else (One of the few examples of "legal" use is /tmp/)

----

Now, to actually answer the original question.

The guide you posted is for Ubuntu, not OpenBSD
Ubuntu is very different.

If I understand it correctly, you want to have /var/www/htdocs/images/ writable by both Apache and by Squid?

One method of doing that is creating a new group, put both the apache and squid users in that group, and making this directory group writable (Using chmod 775)

I don't know why /usr/local/bin/flip.pl needs to be chmod 777? Since this script is executed I would consider it to be extremely bad security practice to make this world-writable! Maybe the problem you had was that it wasn't executable by everyone? Try chmod 755
__________________
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things.
Reply With Quote