Answer a question

I have been trying to install NetLogo under my Ubuntu setup. I have downloaded the latest NetLogo 5.3 files and have extracted them.

I placed the files in the /opt/netlogo-5.3.0/ directory. I then proceeded to create a symbolic link to the NetLogo executable from the /usr/bin directory.

sudo ln -s /opt/netlogo-5.3.0/NetLogo netlogo
 @ubuntu:~$ ll /usr/bin/netlogo 
lrwxrwxrwx 1 root root 26 Jan  4 10:36 /usr/bin/netlogo -> /opt/netlogo-5.3.0/NetLogo*

However, when I try to run NetLogo by issuing the netlogo command, it gives me a Permission Denied error. I can however run it as sudo netlogo

Is it possible to get it to run without relying on sudo?

Answers

It sounds like you need to change the file permissions of the NetLogo file with chmod, or change the file owner with chown.

ls -l /opt/netlogo-5.3.0/NetLogo will probably show the permissions as "rxw------". Try

sudo chmod 755 /opt/netlogo-5.3.0/NetLogo

to fix the problem, changing perms to "rwxr-xr-x".

(755 is an octal (base 8) number. The first digit says what the owner can do. The second says what members of the file's group can do. The third says what everyone can do. 7 is binary number 111: read, write, execute ("rwx"). 5 is binary 101: read, not write, execute. So chmod 755 gives group members and everyone the ability to read and execute the file, but not change it.)

It's possible that you also need to change the permissions on the directories under the NetLogo file. 755 should work for that, too.

Logo

Ubuntu 社区为您提供最前沿的新闻资讯和知识内容

更多推荐