lua-users home
lua-l archive

Re: Penlight rockspec read non-permission, why?

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Am 13.11.2014 um 07:28 schröbte Dirk Laurie:
Under Linux, I have to "sudo luarocks install" otherwise the stuff
can't go into /usr/local.
The most recent rock I installed (2014年11月03日) is Penlight.
An ordinary user can't show it.
$ luarocks show penlight
Error: Could not load rockspec file
/usr/local/lib/luarocks/rocks/penlight/1.3.1-1/penlight-1.3.1-1.rockspec
(cannot open /usr/local/lib/luarocks/rocks/penlight/1.3.1-1/penlight-1.3.1-1.rockspec:
Permission denied)
I reinstalled it, no difference. I have to `sudo` to show it.
None of my other rocks has this problem.
Theory 1: It only affects rocks installed after a certain date. Test it by
installing another rock. Can show it, theory is wrong.
Theory 2: Something funny about Penlight itself. Test it by downloading
the rock.
$ unzip -l penlight-1.3.1-1.src.rock | grep rockspec
 2169 2013年09月24日 19:17 penlight-1.3.1-1.rockspec
 2157 2013年09月24日 19:17 Penlight/penlight-1.1.0-3.rockspec
There's an old rockspec lying around in the Penlight directory.
That _is_ funny. But can it cause the error?
No. The problem is that the rockspec in the source rock has the wrong permissions (-rw-------). When you installed via `sudo`, `root` became the owner, so you can only read this rockspec whenever you are `root`. You can fix the problem yourself using `sudo chmod a+r` on the installed rockspec in the rocks tree, but someone (@Steve?) should probably upload a fixed source rock instead.
Philipp

AltStyle によって変換されたページ (->オリジナル) /