Pregunta

I have MATLAB installed in my home directory on a linux machine which has multiple users. I want to allow one specific user and not all users to be able to run MATLAB from his user login. How can I do this?

I believe that one way to do this is to change the permissions of my home directory so that it's accessible to all users but I don't want to do that.

¿Fue útil?

Solución

You can change the permissions on just the MATLAB install.

If MATLAB is installed to /home/*squirly*/MATLAB, you could run the command below to make it accessible to all users.

chmod -R a+rw /home/*squirly*/MATLAB

If you do not own the directory you will need to prepend the command with sudo.

BONUS:

If you want to allow only some users to use MATLAB.

Make a group called matlab:

sudo groupadd matlab

Make matlab the group owner of the matlab install:

sudo chgrp -R matlab /home/*squirly*/MATLAB

Allow the group to read/write to the matlab directory:

sudo chmod -R g+rw /home/*squirly*/MATLAB

Add users who will use matlab to the matlab group:

sudo usermod -aG matlab *squirly*

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top