Una vez acabada la instalación del AMP, tenemos que cambiar los parmisos de los directorios var y www para que podamos trabajar desde ellos desde un usuario «normal» para ello les pondremos permisos de acceso 777.
la forma de hacerlo es desde el usuario «root». Como en Ubuntu este usuario está «escondido» por razones de seguridad, utilizaremos la siguiente secuencia de comandos para ganar acceso a dicho usuario y cambiar los parmisos.
Todos los comandos de dan desde la «terminal»
Los comandos que tengo que dar están en rojo, las respuestas del sistema están en negro y de ellas hemos cambiado a letra verde los elementos en que me tengo que fijar para comprobar que todo ha ido bien.
adri@ubuntu:~$ sudo su –
[sudo] password for adri:
root@ubuntu:~# cd ..
root@ubuntu:/# chmod 777 /var/www
root@ubuntu:/# cd var
root@ubuntu:/var# ls -al
total 56
drwxr-xr-x 16 root root 4096 2010-01-05 20:23 .
drwxr-xr-x 22 root root 4096 2010-01-05 21:02 ..
drwxr-xr-x 2 root root 4096 2009-11-01 07:42 backups
drwxr-xr-x 21 root root 4096 2010-01-05 20:23 cache
drwxrwxrwt 2 root root 4096 2009-11-01 07:35 crash
drwxr-xr-x 2 root root 4096 2009-04-20 16:07 games
drwxr-xr-x 63 root root 4096 2010-01-05 20:24 lib
drwxrwsr-x 2 root staff 4096 2009-04-13 11:33 local
drwxrwxrwt 3 root root 60 2010-01-05 21:03 lock
drwxr-xr-x 17 root root 4096 2010-01-05 21:02 log
drwxrwsr-x 2 root mail 4096 2009-04-20 15:59 mail
drwxr-xr-x 2 root root 4096 2009-04-20 15:59 opt
drwxr-xr-x 19 root root 680 2010-01-05 22:19 run
drwxr-xr-x 7 root root 4096 2009-10-26 12:20 spool
drwxrwxrwt 3 root root 4096 2010-01-05 22:25 tmp
drwxrwxrwx 2 root root 4096 2010-01-05 20:24 www
root@ubuntu:/var# cd ..
root@ubuntu:/# ls
bin etc initrd.img.old mnt sbin tmp vmlinuz.old
boot home lib opt selinux usr
cdrom host lost+found proc srv var
dev initrd.img media root sys vmlinuz
root@ubuntu:/# chmod 777 var
root@ubuntu:/# ls -al
total 116
drwxr-xr-x 22 root root 4096 2010-01-05 21:02 .
drwxr-xr-x 22 root root 4096 2010-01-05 21:02 ..
drwxr-xr-x 2 root root 4096 2010-01-05 19:05 bin
drwxrwxrwx 1 root root 8192 2010-01-05 19:11 boot
lrwxrwxrwx 1 root root 11 2009-10-01 19:09 cdrom -> media/cdrom
drwxr-xr-x 16 root root 3640 2010-01-05 21:02 dev
drwxr-xr-x 150 root root 12288 2010-01-05 21:14 etc
drwxr-xr-x 3 root root 4096 2009-10-01 19:14 home
drwxrwxrwx 1 root root 12288 2009-12-23 17:14 host
lrwxrwxrwx 1 root root 33 2010-01-05 19:09 initrd.img -> boot/initrd.img-2.6.31-16-generic
lrwxrwxrwx 1 root root 33 2009-10-31 18:28 initrd.img.old -> boot/initrd.img-2.6.31-14-generic
drwxr-xr-x 18 root root 12288 2010-01-05 19:05 lib
drwx—— 2 root root 16384 2009-10-01 19:09 lost+found
drwxr-xr-x 3 root root 4096 2009-12-20 22:01 media
drwxr-xr-x 2 root root 4096 2009-04-13 11:33 mnt
drwxr-xr-x 2 root root 4096 2009-04-20 15:59 opt
dr-xr-xr-x 172 root root 0 2010-01-05 22:02 proc
drwx—— 12 root root 4096 2010-01-05 22:22 root
drwxr-xr-x 2 root root 4096 2010-01-05 19:09 sbin
drwxr-xr-x 2 root root 4096 2009-03-06 17:21 selinux
drwxr-xr-x 3 root root 4096 2009-10-31 18:15 srv
drwxr-xr-x 12 root root 0 2010-01-05 22:02 sys
drwxrwxrwt 20 root root 4096 2010-01-05 22:21 tmp
drwxr-xr-x 11 root root 4096 2009-10-31 18:06 usr
drwxrwxrwx 17 root root 4096 2010-01-05 22:27 var
lrwxrwxrwx 1 root root 30 2010-01-05 19:09 vmlinuz -> boot/vmlinuz-2.6.31-16-generic
lrwxrwxrwx 1 root root 30 2009-10-31 18:28 vmlinuz.old -> boot/vmlinuz-2.6.31-14-generic
root@ubuntu:/# cd var
root@ubuntu:/var# cd www
root@ubuntu:/var/www# ls
index.html
root@ubuntu:/var/www# chmod 777 index.html
root@ubuntu:/var/www# ls -al
total 12
drwxrwxrwx 2 root root 4096 2010-01-05 20:24 .
drwxrwxrwx 17 root root 4096 2010-01-05 22:27 ..
-rwxrwxrwx 1 root root 177 2010-01-05 20:24 index.html
root@ubuntu:/var/www#