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.
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.
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*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With