? about installation of an app, and root vs user account
I've recently installed Jalbum 5.2 on my SUSE 9.1 laptop. I encountered some difficulty during the installation, that makes little sense to me, so I figured maybe you guys and gals could enlighten me. I thought I should, as a matter of routine, install as root, so prior to installing the app, I su'd. The installation failed, indicating it could not find an installed Java VM. 'which java' returned nothing. As a user, 'which java' found java on the system. SO, I determined the problem was related to a path issue, and tried to add the java directory to root's path using the statement: PATH=$PATH:~/bin:/usr/lib/java/jre/bin/java That didn't seem to change the path. So I exited the root account, and used su again, only this time I appended a hyphen, which I thought meant I would assume the root account, only with the user account's environment, including the user's path. The installation got further, but failed this time with an error I didn't understand and don't recall. Finally, I installed the app as the user, and the install went perfectly. A) Why would the install fail when run as root, but complete when run as a normal user? B) Does the command "su -" actually use the path and other environment variables of the user account you are coming from? If not, what does it do? Thanks, Steve PS: In case you haven't seen it, JAlbum is a really cool little web-photo-album generator. It's slick - if you're looking for something like that, check it out.
On Saturday 23 April 2005 9:56 am, Steve Jacobs wrote:
I've recently installed Jalbum 5.2 on my SUSE 9.1 laptop. I encountered some difficulty during the installation, that makes little sense to me, so I figured maybe you guys and gals could enlighten me.
I'm no expert, but Jalbum is not designed to be install or run from root. Root's environment is totally different from normal users, its path is different so it will not find the java runtime. This is intentional, the root user should not be treated as a normal user and should not be running certain applications in order to ensure the security of the system. As you noted, Jalbum installs and runs perfectly from a normal user, just as it was designed to. Your experience is not a sign of a problem, things are working exactly as they are supposed to work. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-20a-default x86_64
Just to clarify, I do know better than to run as root. I thought,
apparently incorrectly, that I should perform the install as root, and
then use the program from my normal user account. Is that an
unrecommended way of doing things?
On 4/23/05, Scott Leighton
On Saturday 23 April 2005 9:56 am, Steve Jacobs wrote:
I've recently installed Jalbum 5.2 on my SUSE 9.1 laptop. I encountered some difficulty during the installation, that makes little sense to me, so I figured maybe you guys and gals could enlighten me.
I'm no expert, but Jalbum is not designed to be install or run from root. Root's environment is totally different from normal users, its path is different so it will not find the java runtime.
This is intentional, the root user should not be treated as a normal user and should not be running certain applications in order to ensure the security of the system.
As you noted, Jalbum installs and runs perfectly from a normal user, just as it was designed to. Your experience is not a sign of a problem, things are working exactly as they are supposed to work.
Scott
-- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-20a-default x86_64
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Saturday 23 April 2005 11:02 am, Steve Jacobs wrote:
Just to clarify, I do know better than to run as root. I thought, apparently incorrectly, that I should perform the install as root, and then use the program from my normal user account. Is that an unrecommended way of doing things?
It depends on what you are installing. If you are installing an RPM, then yes, do it from root. If a non-RPM package, then follow the instructions for that package, some need root for installation, some don't, some are designed to be installed by the end user. Scott -- POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.11.4-20a-default x86_64
On Saturday 23 April 2005 18:56, Steve Jacobs wrote:
I've recently installed Jalbum 5.2 on my SUSE 9.1 laptop. I encountered some difficulty during the installation, that makes little sense to me, so I figured maybe you guys and gals could enlighten me.
I thought I should, as a matter of routine, install as root, so prior to installing the app, I su'd. The installation failed, indicating it could not find an installed Java VM. 'which java' returned nothing.
You need to use 'su -' instead of 'su' when you go to root. The extra dash makes sure you get a full user environment as root
As a user, 'which java' found java on the system. SO, I determined the problem was related to a path issue, and tried to add the java directory to root's path using the statement: PATH=$PATH:~/bin:/usr/lib/java/jre/bin/java
You need to use 'export' to make it 'take effect'. So export PATH=$PATH:~/bin:/usr/lib/java/jre/bin/java but if you use the dash when you su, you won't need to
B) Does the command "su -" actually use the path and other environment variables of the user account you are coming from? If not, what does it do?
If you use the dash, it will get the full login procedure, so the PATH variable and other things are set from /etc/profile and other global configuration files, so it should be equivalent to logging in as root on the login prompt. But did you really use the dash? I would have expected 'which java' to work then
participants (3)
-
Anders Johansson
-
Scott Leighton
-
Steve Jacobs