Opened 13 years ago

Closed 13 years ago

#30550 closed defect (fixed)

scala_select sets faulty permissions

Reported by: m@… Owned by: krischik@…
Priority: Normal Milestone:
Component: ports Version: 2.0.1
Keywords: Cc: blair (Blair Zajac)
Port: scala_select

Description

I used scala_select to select scala29 as default version. Unfortunately, it seems that scala_select sets permissions that do not allow a standard user to call scala:

As admin:

$ ls -la /opt/local/bin/scala
lrwxr-x---  1 root  admin  36 Aug  2 18:05 /opt/local/bin/scala -> /opt/local/share/scala-2.9/bin/scala

As standard user:

$ scala

ls: /opt/local/bin/scala: Permission denied
java.lang.ClassNotFoundException 
 - klass: 'java/lang/ClassNotFoundException'
#  fatal error: ExceptionMark destructor expects no pending exceptions

/opt/local/bin/scala: line 161: 18137 Trace/BPT trap          "${JAVACMD:=java}" $JAVA_OPTS "${java_args[@]}" ${CPSELECT}${TOOL_CLASSPATH} -Dscala.usejavacp=true -Dscala.home="$SCALA_HOME" -Denv.emacs="$EMACS" $CYGWIN_JLINE_TERMINAL scala.tools.nsc.MainGenericRunner "$@"

So, I fixed the permissions as admin user:

$ sudo chmod -h a+rx /opt/local/bin/scala
$ ls -la /opt/local/bin/scala
lrwxr-xr-x  1 root  admin  36 Aug  2 18:05 /opt/local/bin/scala -> /opt/local/share/scala-2.9/bin/scala

Now, I can call scala as standard user as well.

Change History (3)

comment:1 Changed 13 years ago by m@…

Cc: m@… added

Cc Me!

comment:2 Changed 13 years ago by jmroot (Joshua Root)

Cc: m@… removed
Owner: changed from macports-tickets@… to krischik@…

Please remember to cc the maintainer.

The script should really go away in favour of port select anyway.

comment:3 Changed 13 years ago by jmroot (Joshua Root)

Cc: blair@… added
Resolution: fixed
Status: newclosed

Updated to use select portgroup in r92974.

Note: See TracTickets for help on using tickets.