Huan Truong a ?crit :
> Quick and dirty way:
> chmod 777 /var/www/upload_dir -R
> Doesn't mean that it is the best way (actually it's a pretty bad idea
> to chmod 777) but for your purpose, but it will work though.
> FYI: Google for "upload directory permissions".
Yurgl... Please never put a 777 anywhere except for a tmp directory in
which case it would be a 1777 instead! The '1' (corresponding to 't' in
"ls -l" display) here protecting other people from deleting your files.

To give apache the right to write to some directory in Debian, Ubuntu
and other Debian's derivatives, please use this:
  chgrp www-data /var/www/somedir
  chmod g+w /var/www/somedir

It's too much rights already, so it may open a hole for some
intruder/cracker (not hacker) to put his own .php/.pl/.py/.sh/... files,
but at least it doesn't open it right away for anybody to do anything in
some web directory (which a 777 would do).

-- 
Jean Christophe "????" ANDR?   ? ? ?   Responsable technique r?gional
Bureau Asie-Pacifique (BAP)    ? ? ?   http://www.asie-pacifique.auf.org/
Agence universitaire de la Francophonie (AuF)  ? ? ?  http://www.auf.org/
Adresse postale : AUF, 21 L? Th?nh T?ng, T.T. Ho?n Ki?m, H? N?i, Vi?t Nam
T?l. : +84 4 9331108  ?  Fax : +84 4 8247383  ?  Cellul. : +84 91 3248747
? Note personnelle: merci d'?viter de m'envoyer des fichiers PowerPoint ?
? ou Word, cf http://www.gnu.org/philosophy/no-word-attachments.fr.html ?


-------------- section suivante --------------
Une pi?ce jointe non texte a ?t? nettoy?e...
Nom: signature.asc
Type: application/pgp-signature
Taille: 260 octets
Desc: OpenPGP digital signature
Url: 
http://lists.hanoilug.org/pipermail/hanoilug/attachments/20081213/089b676e/attachment.pgp
 

Trả lời cho