Page 1 of 2

When 4.8 Happens!

Posted: Sun Oct 27, 2013 1:48 pm
by nymusicman
I notice that you have a new Download manager in 4.8! That is so exciting with one problem for linux. Currently modules are stored in /usr/share/local/bibleanalyzer/modules (something like that!). That is going to be a problem with the download manager as we are going to have to run BA as root, unless what your doing is just have the Download manager launch the .run files, then I suppose we would just have to put our password in quite a few times as we go through module by module.

I probably haven't read through the forums enough to determine the reason for this behavior. But most Linux applications would have installed modules in a ~/.bibleanalyzer/modules folder.

Maybe this should be a consideration for the download manager, or at least create a script so we would only have to run sudo once while installing all the modules without running BA as root/sudo.

Hope these comments help! And God bless you for making the absolute best Linux Bible application!!!

Re: When 4.8 Happens!

Posted: Mon Oct 28, 2013 6:18 am
by Tim
Yes, Linux permissions can be a pain. I still do not know why there cannot be a common area all users have write access to for files such as this.

We put the modules in the /opt folder for a few reasons,

Ubuntu policies want the files there. Only config and settings files in the user folder.
A .deb installer cannot install to the user folder. The only way to get there is to install and then run a script to move the files.
Files in a user folder are not available to other users. That is, each user must have their own set of files (modules) which multiplies the space used.

So with the Module Downloader, in Linux we will likely have it so the user will select the modules they want to download and then enter their password in a dialog. Then they will download and install. The password will only be needed once per download session.

We will see how it works.

Re: When 4.8 Happens!

Posted: Mon Oct 28, 2013 7:17 am
by nymusicman
If your not concerned with security than the answer is obvious. Have the installer chmod -R 777 the modules and search database folders. Than every user on the system can read and write to only those folders. Just make sure it's will documented so the security conscience can make there own changes if necessary.

Hope this helps and God bless!

Re: When 4.8 Happens!

Posted: Mon Oct 28, 2013 7:21 am
by nymusicman
I also don't understand this Ubuntu rule that says the modules couldn't go in the user settings folder when the sword project has no problems with it. Nor does any other open source software. Interesting.

However I might understand a few scenarios out there where users might want to share modules.

Re: When 4.8 Happens!

Posted: Mon Oct 28, 2013 8:12 am
by Tim
I have found that Ubuntu doesn't always follow their posted rules. It seems apps that were developed before the Software Center and placed in /usr/share, etc. were kind of "grandfathered in." But to get it in the Software center I put everything in /opt, as they say they require, to not give them a reason to reject it.

I would guess most users only have one "user" on their system, but some do have multiple.

The 777 permissions on the /modules folder would work great, but some see this as a security risk. I really don't know why.

Re: When 4.8 Happens!

Posted: Wed Jan 15, 2014 12:03 am
by nymusicman
Well as far as the permissions issue, as long as your well documented, I wouldn't worry about it. Do what you have to do to make a seamless experience. More of your users would appreciate that.

Or if you just make the script (really simple bash script will do the trick) that copies the "default" modules in the users directory the first time BA is opened.

Another thing you could do, since you are incorporating a download system into BA, is don't have any preinstalled modules with BA. The first time BA opens it can run the download part and offer the 'default' choices! This is what most of the software from the SWORD project does (well Xiphos and Bibletime anyway).

Just some ideas that should get you around the software center issues, and will keep you 'compliant' with the Linux community at large.

Technically it's just as much of a big 'no no' to run software as sudo as it is to 777 a non user folder.

Re: When 4.8 Happens!

Posted: Wed Jan 15, 2014 6:55 am
by Tim
We just put the Linux beta of 4.8 up. See the "Beta" pages.

As stated there the modules downloaded with the Download Manager will go under the users home folder. This avoids the permissions issues. However, the modules installed with Bible Analyzer and those installed with a .run archive/script still go to the /opt folder.

I'm considering trying to put them all in the home folder.

Re: When 4.8 Happens!

Posted: Wed Jan 15, 2014 11:28 am
by nymusicman
It's making me very nervous that I have to enter my password every time I start bibleanalyzer to build word lists. Shouldn't the word lists be stored in the users directory?

It's one thing if I know I'm opening the software with sudo, but when the software automatically decides for me, this is a really bad thing.

Does this mean the entire program is running as root and staying that way? Is it just the word list command that's running as root?

Okay, I just did a test and installed a module and it looks like BA as a whole is running in userland. But please let us know. Entering a sudo password everytime BA starts makes me very nervous.

Re: When 4.8 Happens!

Posted: Wed Jan 15, 2014 12:29 pm
by Tim
Bible Analyzer is not run as root. When you enter your password it is only for the index creation task. This should only run once until you download certain new modules. It the password dialog coming up every time you start 4.8?

Asking the user for a password is a bad thing? That is the way Linux works. How does one know what any app is doing when he enters his password? I get tired of constantly having to enter my password when even developing and compiling BA for Linux. Something I don't have to do with Windows or Mac.

When the next version of BA is ready that downloads also the premium modules through the download manager, all modules will go into the users folder. Then I will likely try and devise a way to get the modules bundled with BA into the user folder. A .deb installer can't do it without a supplemental post install script. The downside is the Bible Analyzer program is installed for all users in /opt but the modules aren't. Thus BA won't run if another user tries to run it.

What is desperately needed is a common access data folder. A folder all users can write to.

Re: When 4.8 Happens!

Posted: Mon Jan 27, 2014 2:20 am
by Brother Mike
chmod 777 on a single user machine is not as much of a security issue as it is on a multiuser system, but still bad practice.

Linux permissions are not different nor complex than any other *NIX permissions are when well understood, can be great to work with.

Is a group for BA were created and the user added to that group either by the install or the user themselves and group permissions were set accordingly, anything that the root user could do, that user would be able to do as well.

A script could be included or downloaded, or just directions given. A user of Linux should be able to do this, or perhaps should go back to Windows,

Create a group:

Code: Select all

groupadd [groupname]

Code: Select all

group add ba
Add user to group:

Code: Select all

usermod -a -G <groupname> username

Code: Select all

usermod -a -G ba mjones
Set the group owner of the bibleanalyazer directory to ba

Code: Select all

chown -R root:ba bibleanalyzer
Set permissions for the user group:

Code: Select all

chmod 774 bibleanalyzer
The above would need to be done once by root, after that, should work well. I install several programs manually into the /opt directory and do the above and I am able to read/write into those without being root after set up properly.

If people want Linux to be as user friendly as Windows and not put in the effort of learning this type of stuff, or the command line, they should just stay on Windows. It should not be necessary to tamper with security to make things easier on the user. We have seen how well that work with MS products.