Você está na página 1de 2

UNIVERSIDAD DE COLIMA

FACULTAD DE TELEMTICA
Sistemas Operativos y Servicios de Internet
Practica 3. Permisos de Archivos
Nombre: MIGUEL ANGEL MARTINEZ VERDUZCO Calif.:_________
Realiza las actividades en la computadora y en la hoja solamente escribe el comando correcto.
Section 1: Listing information on files
1.

Create a directory in your home directory called mypractice3. Copy the file /bin/cat into your current (home) directory.Copy the file /usr/bin/cal
into the mypractice3 directory.List the files in your current directory. You should see the two you just copied

________________mkdir/home/mypractice3; cp /bin /cat /mypractice3 ;cp /usr/bin/cal/mypractice3


2.

Change to the mypractice3 directory and rename the two files that you just copied to mycat and mycal respectively.

Cd mypractice3 ; mykdir cp mycat and mycal


3.

Display a long listing of the files in the myscripts directory. Notice the owner and permissions for the files that you copied in the previous
exercise. Record the permissions for mycat. chmod Record the permissions for mycal chmodl

4.

Now, do a long list on the original cat and cal files in the /bin and /usr/bin directories and compare the permissions to those in the mypractice3
directory. You own the copies but not the originals.

ls- l /usr/bin/cat /usr/bin/cal

5.

Record the permissions for cat. chmod 777 cat

Record the permissions for mycat .chmod 777 mycat

Record the permissions for cal. Chmod 777 cal

Record the permissions for mycal. Chmod 777 mycal.

Change the modification time of mycal and mycat in the mypractice3 directory. Check to see that the time actually changed.

touch mycal mycat ls l


What is another use for the touch command? Actualiza los registros de fecha y hora

6.

Make it so you can reference the mycal file in the mypractice3 directory by the name of home_mycal in your home directory.

ln mycal ../home_mycal; ls l mycal


Compare the detailed file information for both files. Is there any difference? s
What is the link count? cualquier cambio que se haga tanto en el directorio original como en el contenido

del enlace simblico quedar reflejado en el otro.


7.

Change the directory to your home directory. Execute home_mycal. What does the output look like?
____________________________________________________________________________________________________________________

8.

Now, change permissions on the home_mycal file so that you, the owner of the file, have read only permission. Try running the mycal command.
Can you do it?

chmod 455 home_mycal

Why or why not?

Remove home_mycal. Did that remove myscripts/mycal? rm home_mycal Why or why not?
____________________________________________________________________________________________________________________

Section 2: Working with file permissions


9.

Change the directory to the mypractice3 directory. Using symbolic notation of the chmod command, remove the read permission on the other
permission bits from the file mycat. Check the new permissions.

Cd mypractice3; Chmod o-r mycat ; ls-l mycat


10.

Using octal notation, change the permissions on mycat so that the owner permission bits are set to read-only permission with no permission for
anyone else. Check the new permissions.

chmod 400 mycat ; ls l mycat


11.

Use the mycat command to display the contents of the .profile file. Did it work? Mycat ../.profile
What happened? Modifica el bash de profile en la carpeta mycat

12.

Make your home directory the current directory. Check to see if you are in your home directory.

Cd

Section 3: Working with directory permissions


13.

Alter the permissions on the mypractice3 directory so that you have read-only access to it.

Chmod u=r mypractice3


14.

Use a long list to check that you have set the permissions correctly.

_ls ld mypractice3
15.

Try getting a simple list of the contents of the directory. Try a long list.

ls l mypractice3
Did they work? Why or why not?

no ya que marca que el bash mypractice3 no tiene permiso para hacer esa accin
16.

Try to execute mycal. Did it work? Why or why not?

no se puede ya que nos marca acceso denegado ya que cambiamos los permisos
17.

Try to remove mycal. Did it work? Why or why not?


_____rm r mycal se pudo borrar con xito el directorio

18.

Return the permissions of mypractice3 back to its original form of rwxr-xr-x and then remove mycal.?

chmod 755 mypractice3 ;

rm mypractice3/mycal

Você também pode gostar