owenh000 / asciidoctor-multipage

A configurable multipage HTML converter for Asciidoctor
https://owenh.net/asciidoctor-multipage
MIT License
58 stars 23 forks source link

Incorrect restrictive permissions within gemfile #8

Closed MattBlissett closed 3 years ago

MattBlissett commented 3 years ago

After installing this with gem install asciidoctor-multipage, the program has 0640 permissions, so cannot be read by non-root users:

ls -l /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-multipage-0.0.5/lib/asciidoctor-multipage.rb
-rw-r-----    1 root     root         20427 Feb 26 11:32 /usr/lib/ruby/gems/2.7.0/gems/asciidoctor-multipage-0.0.5/lib/asciidoctor-multipage.rb

This seems to result from the permissions inside data.tar.gz in the Gemfile:

tar ztvf data.tar.gz
-rw-r----- wheel/wheel   20427 2021-02-05 07:28 lib/asciidoctor-multipage.rb

I think this is probably inherited from the build environment, but I don't know Ruby or GitHub runners enough to be sure.

Here's the error, in case it helps someone find the issue:

/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:92:in `require': cannot load such file -- asciidoctor-multipage (LoadError)
owenh000 commented 3 years ago

Thanks for the report! This is addressed by commit 5687a1f97804cffc18e7c9494a2868b74c15b5ff and should be fixed now in v0.0.6.

hnguyentt commented 3 years ago

Hi, I still face this problem. Do you know the possible reason for that?

owenh000 commented 3 years ago

@nguyenhoa93, the problem appears to be fixed:

$ wget 'https://rubygems.org/downloads/asciidoctor-multipage-0.0.9.gem'
$ tar -xf asciidoctor-multipage-0.0.9.gem
$ tar -ztvf data.tar.gz
-rw-r--r-- wheel/wheel   20986 2021-03-12 23:27 lib/asciidoctor-multipage.rb

How are you installing the gem?