This is a Clilstore unit. You can .
INTRODUCTION
Take into account that this first section isn't the activity yet. It is meant to show you how to work with the Linux permissions system.
Notice that there are three sections in the pemissions tab, propietario, grupo y otros. These are the thee level of users you can grant permissions Propietario: Permissions granted to the folder owner Grupo: Permissions granted to the folder main group Otros: Rest of users
The folders permissions are
And the meaning of this permissions are shown in the table below:
Now, get the properties tab of the documento file in any of the compartido folders.
Notice how the properties window still references the propietario, grupo and otros but the permissions are slightly different in a file than in a folder.
The meaning of this permissions are over a file are
|
Now start the real activity.
ACTIVITY 1. CHANGE FILES PERMISSIONS ON A FOLDER ONE BY ONE
Select the file documento in the folder contabilidad/publico and get its contextual menu clicking on the right mouse button. Then select the properties, and the permissions tab. Now the value the permissions for the otros group is Sólo lectura Change this value to lectura y escritura using Nautilus in admin mode
ACTIVITY 2. HOW TO MODIFY THE PERMISSIONS ON ALL THE FILES OF A FOLDER AT THE SAME TIME
We are going to change the permissions for al the files inside the compartida folder
Select the text file DOCUMENTO_COMPARTIDO in the compartida folder
Change its permissions for otros usuarios to sólo lectura
Make several copies of this file (copy and then paste it several times). Now you have a number of files, all them with the sólo lectura permission for otros
Select the folder Compartida and get its contextual menu. Select propiedades. Select the permisos tab
Get into the folder and check the folder properties: The permissions in all the files have changed to lectura y escritura for otros
ACTIVITY 3 SETTING THE PERMISSIONS TO FULLFILL THE REQUIREMENTS
Now we are going to set the exercise requierement for the contabilidad folder. Pay attention because you must make the same for the rest of folders later. We must set the permissions showed in the following tables for the folders inside contabilidad
DEPARTMENT FOLDERS PERMISSIONS
CARPETA RESTRINGIDA /RESTRICTER FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
NO |
NO |
Rest of workers |
NO |
NO |
NO |
NO |
CARPETA COMPARTIDA/SHARED FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
SI |
NO |
Rest of workers |
SI |
NO |
NO |
NO |
CARPETA PUBLICA/PUBLIC FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
SI |
SI |
Rest of workers |
SI |
SI |
NO |
NO |
We have the following list of users (created in part 2)
Department |
Head of department |
Department workers |
Recursos Humanos |
Regina |
Renato,Remedios, Reinaldo |
Contabilidad |
Concepcion |
Consuelo, Constantino,Constancio, |
Ventas |
Ventura |
Veronica,Velasco |
Gestion administrativa |
Gemma |
Gerardo, Germán |
We should have the following groups (created in part 3)
empconta |
Consuelo, Constantino, Constancio, Concepcion |
emprecushum |
Regina, Renato,Remedios, Reinaldo |
empventas |
Veronica,Velasco,Ventura |
empgesadm |
Gerardo,German,Gemma |
STEP 1. CHANGE THE OWNERSHIP AND THE MAIN GROUP IN FOLDERS AND FILES
Let's begin changing the ownership of each deparment folder. Keep in mind that a folder is owned by the user who created it.. And you have created all the folders with an admin Nautilus, so, all the folders belong to the ROOT user. In this step we are going to make the heads of department owners of their department folders and files.
For instance, to make Concepcion owner of the Contabilidad folder:
Log in the system with your admin user
Open a terminal aplicaciones->accesorios->terminal
Run Nautilus in admin mode entering sudo nautilus, and then enter the admin user password
Select the home/contabilidad folder.
Open the contextual menu (clickin on the folder with the right mouse button)
Select the properties option. This opens the folder properties page
Select the permissions tab
Change the owner . Deploy the pull-down owners menu and select Concepcionas shown in the picture
Now Let's change the main group. In contabilidad department the main group must be empconta
Set Concepcion as the owner, and empconta, as the main group in the three subfolders (restringida, compartida, pública) of the Contabilidad folder
Set Concepción as owner, and empconta, as main group in each files inside the contabilidad folders
Repeat the procedure in every file inside the folders
SET THE PERMISSIONS IN CABANYAL_FRUIT FOLDER
SET PERMISSIONS FOR THE CONTABILIDAD FOLDER
FOR THE HEADS OF DEPARTMENT
Remember: the permissions options on the folders were:
Open the permissions tab, in the properties window, for the restringida folder
The Heads of department should be allowed to perform any action in their folders.
CARPETA RESTRINGIDA /RESTRICTER FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
NO |
NO |
Rest of workers |
NO |
NO |
NO |
NO |
FOR THE DEPARTMENT WORKERS
The department workers should be able to list the folder contents and acces the files, but can not modify them.
CARPETA RESTRINGIDA /RESTRICTER FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
NO |
NO |
Rest of workers |
NO |
NO |
NO |
NO |
For the group empconta set the option acceso a los ficheros in the restringida folder.
FOR THE OTHER DEPARTMENT WORKERS
The rest of users can't carry out any operation on this folder,
CARPETA RESTRINGIDA /RESTRICTER FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
NO |
NO |
Rest of workers |
NO |
NO |
NO |
NO |
For the otros group set the option ninguno in the restringida folder.
The final state in this permisssions window must be this
SET THE FILES PERMISSIONS
Make sure the permissions tab is set as shown in the image below
Log in the system as a Contabilidad worker, for example Constancio.
Check if the exercise requirements for the Restringida folder are fulfilled. Acording to these requirements Constancio should not be able to create or delete files, neither modify files. But he should be allowed to open and read files
Log the system with a user who doesn't belong to Contabilidad. For example German
Check that this user can't even list the folder contents
CARPETA COMPARTIDA/SHARED FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
SI |
NO |
Rest of workers |
SI |
NO |
NO |
NO |
The Head of department can perform any operation. Set crea y suprime ficheros
CARPETA COMPARTIDA/SHARED FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
SI |
NO |
Rest of workers |
SI |
NO |
NO |
NO |
The department workers should be able to list the folder contetns, open and modify files, but they shouldn't be able to create or delete files, so set acceder a los ficheros
CARPETA COMPARTIDA/SHARED FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
SI |
NO |
Rest of workers |
SI |
NO |
NO |
NO |
The rest of users should only be allowed to list contents, so set listar ficheros
The permissions windows final state must be this shown below
Now let's set the files permissions, Select the button Cambiar permisos a los archivos contenidos, and ...
CARPETA PUBLICA/PUBLIC FOLDER |
||||
List folders |
Open folders |
Modify folders |
Create/delete folders |
|
Deptartment Heads |
SI |
SI |
SI |
SI |
Dept. workers |
SI |
SI |
SI |
SI |
Rest of workers |
SI |
SI |
NO |
NO |
END UP THE ACTIVITY
Apply the same permissions pattern to the rest of folders and subfolders (administracion, recursos humanos etc)
When finished call the techer in order to asses your exercise
ENTREGA DEL TRABAJO
Abre un terminal con aplicaciones->terminal
Al abrir el terminal estás situado en tu carpeta personal, es decir, si tu nombre es fulano, estás en la carpeta /home/fulano. Para continuar debemos cambiar a la carpeta home, Para ello vamos a emplear la orden cd ( cd significa change directory). Ejecuta cd .. para bajar a la carpeta que contenedora (en este caso para pasar de la carpeta fulano a la carpeta home). También puedes hacer cd /home con el mismo efecto
Muestra el contenido del directorio con la orden ls (ls es una reducción de list)
A ls le podemos añadir el parámetro -R para que se listen también todas las carpetas dentro de la carpeta cabanyal_fruit. Utilizaremos sudo para asegurarnos de que nos muestre todas las carpetas incluyendo aquellas para las que no tenemos permisos
Sitúate en la carpeta actual /home/cabanyal_fruit/
Ejecuta sudo ls -Rla
Haz que la ventana del terminal sea todo lo grande que puedas para que se vea la mayor cantidad de lineas posible. Realiza una captura de pantalla y súbela a moodle
Vamos a ejecutar de nuevo sudo ls -Rla, pero en esta ocasión vamos a guardar la salida del comando en un fichero de texto que subiremos a moodle. En linux esto es muy fácil. Basta añadir al comando el carácter > y el nombre del fichero en el que queremos guardar la salida del terminal. Debemos indicar además que lo guarde en una carpeta en la que tengamos privilegios para crear ese fichero. Nuestra carpeta personal por ejemplo, abajo se muestra un ejemplo para el usuario fulano, cambia fulano por tu nombre de usuario
sudo ls -Rla > /home/fulano/ejercicio3.txt
Comprueba que el fichero ejercicio 3 se ha creado en tu carpeta personal, y súbelo al moodle.
Short url: https://multidict.net/cs/4518