Foros del Web » Administración de Sistemas » Apache »

ayuda con apache i fedora14

Estas en el tema de ayuda con apache i fedora14 en el foro de Apache en Foros del Web. desde php creo 3 carpetas mkdir("/var/www/html/php/pruevas/imatgen/productos/$categoria_nombre",0755); mkdir("/var/www/html/php/pruevas/imatgen/productos/$categoria_nombre/grande",0755); mkdir("/var/www/html/php/pruevas/imatgen/productos/$categoria_nombre/pequeña",0755); las 3 carpetas tanto el propietario como grupo son apache si no pongo la carpeta productos en ...
  #1 (permalink)  
Antiguo 10/02/2011, 01:48
 
Fecha de Ingreso: febrero-2009
Mensajes: 443
Antigüedad: 15 años, 2 meses
Puntos: 1
ayuda con apache i fedora14

desde php creo 3 carpetas

mkdir("/var/www/html/php/pruevas/imatgen/productos/$categoria_nombre",0755);
mkdir("/var/www/html/php/pruevas/imatgen/productos/$categoria_nombre/grande",0755);
mkdir("/var/www/html/php/pruevas/imatgen/productos/$categoria_nombre/pequeña",0755);

las 3 carpetas tanto el propietario como grupo son apache

si no pongo la carpeta productos en 777 me deja escribir pero es muy poco seguro
lo tengo en 755

tenia la carpeta en 777 cree dos capetas con sus subcarpetas canvie el permiso en 755 no puedo borrar
la carpeta que se crea cada vez que creo una categoria y grande y pequeño tampoco

el cortafuegos de linux el SELinux me sale el siguiente error
desactive el cortafuegos por completo y tampoco funcionaba es algo de apache

Código SELinux:
Ver original
  1. SELinux is preventing /usr/sbin/httpd from write access on the directory /var/www/html/php/pruebas/imatgen/productos.
  2.  
  3. *****  Plugin httpd_write_content (92.2 confidence) suggests  ****************
  4.  
  5. If you want to allow httpd to have write access on the productes directory
  6. Then you need to change the label on '/var/www/html/php/pruebas/imatgen/productos'
  7. Do
  8. # semanage fcontext -a -t httpd_sys_rw_content_t '/var/www/html/php/pruebas/imatgen/productos'
  9. # restorecon -v '/var/www/html/php/pruebas/imatgen/productos'
  10.  
  11. *****  Plugin catchall_boolean (7.83 confidence) suggests  *******************
  12.  
  13. If you want to unify HTTPD handling of all content files.
  14. Then you must tell SELinux about this by enabling the 'httpd_unified' boolean.
  15. Do
  16. setsebool -P httpd_unified 1
  17.  
  18. *****  Plugin catchall (1.41 confidence) suggests  ***************************
  19.  
  20. If you believe that httpd should be allowed write access on the productes directory by default.
  21. Then you should report this as a bug.
  22. You can generate a local policy module to allow this access.
  23. Do
  24. allow this access for now by executing:
  25. # grep httpd /var/log/audit/audit.log | audit2allow -M mypol
  26. # semodule -i mypol.pp
  27.  
  28. Additional Information:
  29. Contexto Fuente               system_u:system_r:httpd_t:s0
  30. Contexto Destino              system_u:object_r:httpd_sys_content_t:s0
  31. Objetos Destino               /var/www/html/php/pruebas/imatgen/productos [
  32.                               dir ]
  33. Fuente                        httpd
  34. Dirección de Fuente           /usr/sbin/httpd
  35. Puerto                        <Desconocido>
  36. Nombre de Equipo              fedora14
  37. Paquetes RPM Fuentes          httpd-2.2.17-1.fc14
  38. Paquetes RPM Destinos        
  39. RPM de Políticas              selinux-policy-3.9.7-29.fc14
  40. SELinux Activado              True
  41. Tipo de Política              targeted
  42. Modo Obediente                Enforcing
  43. Nombre de Equipo              fedora14
  44. Plataforma                    Linux fedora14 2.6.35.10-74.fc14.x86_64 #1 SMP Thu
  45.                               Dec 23 16:04:50 UTC 2010 x86_64 x86_64
  46. Cantidad de Alertas           9
  47. Visto por Primera Vez         jue 10 feb 2011 08:08:27 CET
  48. Visto por Última Vez          jue 10 feb 2011 08:12:49 CET
  49. ID Local                      d630714a-5441-4163-9a8c-1ea3cc3af686
  50.  
  51. Mensajes de Auditoría Crudos
  52. type=AVC msg=audit(1297321969.989:39892): avc:  denied  { write } for  pid=2052 comm="httpd" name="productes" dev=dm-4 ino=3276913 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_sys_content_t:s0 tclass=dir
  53.  
  54.  
  55. type=SYSCALL msg=audit(1297321969.989:39892): arch=x86_64 syscall=mkdir success=no exit=EACCES a0=7ff4d2cb4da8 a1=1ed a2=8 a3=1 items=0 ppid=2004 pid=2052 auid=4294967295 uid=48 gid=48 euid=48 suid=48 fsuid=48 egid=48 sgid=48 fsgid=48 tty=(none) ses=4294967295 comm=httpd exe=/usr/sbin/httpd subj=system_u:system_r:httpd_t:s0 key=(null)
  56.  
  57. Hash: httpd,httpd_t,httpd_sys_content_t,dir,write
  58.  
  59. audit2allow
  60.  
  61. #============= httpd_t ==============
  62. #!!!! This avc can be allowed using the boolean 'httpd_unified'
  63.  
  64. allow httpd_t httpd_sys_content_t:dir write;
  65.  
  66. audit2allow -R
  67.  
  68. #============= httpd_t ==============
  69. #!!!! This avc can be allowed using the boolean 'httpd_unified'
  70.  
  71. allow httpd_t httpd_sys_content_t:dir write;













he puesto todas estas variables en 1 tampoco me deja borrar la carpetas i subcarpetas
Código parametros de apache:
Ver original
  1. getsebool -a | grep httpd;
  2. que politica de estas tengo que modificar setsebool -P parametro 1;
  3. allow_httpd_anon_write --> on
  4. allow_httpd_mod_auth_ntlm_winbind --> on
  5. allow_httpd_mod_auth_pam --> on
  6. allow_httpd_sys_script_anon_write --> on
  7. httpd_builtin_scripting --> on
  8. httpd_can_check_spam --> on
  9. httpd_can_network_connect --> on
  10. httpd_can_network_connect_cobbler --> on
  11. httpd_can_network_connect_db --> on
  12. httpd_can_network_memcache --> on
  13. httpd_can_network_relay --> on
  14. httpd_can_sendmail --> on
  15. httpd_dbus_avahi --> on
  16. httpd_enable_cgi --> on
  17. httpd_enable_ftp_server --> on
  18. httpd_enable_homedirs --> on
  19. httpd_execmem --> on
  20. httpd_read_user_content --> on
  21. httpd_setrlimit --> on
  22. httpd_ssi_exec --> on
  23. httpd_tmp_exec --> on
  24. httpd_tty_comm --> on
  25. httpd_unified --> on
  26. httpd_use_cifs --> on
  27. httpd_use_gpg --> on
  28. httpd_use_nfs --> on

Última edición por albertrc; 10/02/2011 a las 02:19

Etiquetas: fedora
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 11:56.