0

Since my SSD is small, I still relegate it to only holding the OS.

So, during Ubuntu install, I created a 60 GB partition for / on my SSD, and a 500 GB partition for /home on my HDD.

However, now I am finding issues such as the one described in this question: Conda update <package>: Permission issues

The accepted answer suggested:

sudo ln ~/anaconda/bin/conda /usr/local/bin/

I had to use a softlink because I was getting an "invalid cross-device link" error if I did not specify the -s for softlink in the command. The following discussion (the very last post) gave me the clue of using a softlink: http://www.linuxquestions.org/questions/linux-newbie-8/invalid-cross-device-link-731268/

sudo ln -s ~/anaconda/bin/conda /usr/local/bin/

Now, I find that I am having an issue that looks superficially similar when using the matlab installer script:

brian@brian-linux:~/matlab-installer$ ls
activate.ini  etc      installer_input.txt  license.txt  sys
archives      help     install_guide.pdf    patents.txt  trademarks.txt
bin           install  java                 readme.txt

brian@brian-linux:~/matlab-installer$ ./install
bash: ./install: Permission denied

brian@brian-linux:~/matlab-installer$ sudo ./install
[sudo] password for brian: 
sudo: ./install: command not found

brian@brian-linux:~/matlab-installer$ bash ./install
./install: line 334: /home/brian/matlab-installer/bin/glnxa64/install_unix: Permission denied

brian@brian-linux:~/matlab-installer$ sudo bash ./install
./install: line 334: /home/brian/matlab-installer/bin/glnxa64/install_unix: Permission denied

What is going on, and how can I prevent such issues once and for all in the future?

  • What is the output of ls -l ./install? It might not be executable. (Just in case you didn't check yet; this, however, may only be a part of the problem). Could it be that your /home is mounted with the noexec parameter? (to check: mount | grep /home)

    (EDIT: to make it executable you can run chmod +x ./install)

    – Kai Apr 06 '15 at 21:15
  • @Kai I think you might be onto the problem. Here's the output of (mount | grep /home): /dev/sdb2 on /home type ext4 (rw). However, I don't see the noexec parameter listed in the fstab file? –  Apr 07 '15 at 14:46
  • @Kai Also, initially ls -l gave me the following for ./install: -rw------- 1, so I did run thechmod` command. –  Apr 07 '15 at 14:50
  • So it runs with ./install now? (until you get that "Permission denied" error from line 334 I suppose?) Also, you could have a look at line 334 in the install script - if the program tries to run install_unix with a path (e.g. simply "/home/brian/matlab-installer/bin/glnxa64/install_unix") then that file might need the executable permission, too. (using the chmod command again). – Kai Apr 07 '15 at 20:29
  • @Kai you got that right -- it runs, until line 334. Is it possible these were set to be non-executable because I copied from another hard drive? –  Apr 07 '15 at 23:26
  • Yes, it is possible (although as far as I know it is rather unusual - however, I could be wrong). How did you copy the files? – Kai Apr 08 '15 at 05:22
  • @Kai I copied them to a USB drive using Ctrl+C and then Ctrl+V (Nautilus). I am having some more permission issues: http://askubuntu.com/questions/608251/i-cant-run-sudo-on-a-certain-command-because-its-not-in-the-sudo-path-how-c –  Apr 12 '15 at 03:46
  • If the USB drive was formatted with NTFS or FAT this is the usual thing that happens - those file systems do not store the Linux file permissions as far as I know. It seems that the other permission issues are solved now? – Kai Apr 13 '15 at 12:12
  • @Kai Yes, it was a FAT USB, I think...so that might explain it. It seems like other permission issues are solved, for the moment. –  Apr 13 '15 at 18:56
  • Nice! So you were able to install matlab without further issues? – Kai Apr 14 '15 at 16:14

1 Answers1

0

This problem occurred because the drive onto which I put /home was partitioned as NTFS. This is not good, and among the known issues it causes is permission issues. See this answer for further detail.