LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 06-02-2008, 04:49 AM   #1
timmit
Member
 
Registered: Oct 2007
Location: Illinois
Distribution: Slackware 12.0
Posts: 46
Blog Entries: 1

Rep: Reputation: 15
Permission Issue With Shell Script and .Jar File


Hello,

Currently I've got the paros proxy files I need in the folder: /home/user/local-utils/paros.

If I am in that directory and type:
~ $ sh startsever.sh

The program will start up just fine. I want to be able to just start the thing from anywhere though. So I added this to my .bashrc

alias paros='sh /home/user/local-utils/paros/startserver.sh'

Now when I type 'paros' while I am in the paros directory, the program starts. But if I am in my home directory, I get:

Unable to access jarfile paros.jar

Here are the permissions for the paros folder:

Code:
-rw-r--r-- 1 user users   53248 2006-08-07 23:20 IeEmbed.exe
-rw-r--r-- 1 user users  188416 2006-08-07 23:20 MozEmbed.exe
-rw-r--r-- 1 user users     130 2006-08-07 23:20 autoupd.bat
drwxr-xr-x 2 user users    4096 2006-08-07 23:20 db/
drwxr-xr-x 2 user users    4096 2006-08-07 23:20 filter/
-rw-r--r-- 1 user users  122880 2006-08-07 23:20 jdic.dll
-rw-r--r-- 1 user users   21045 2006-08-07 23:20 libjdic.so
-rw-r--r-- 1 user users  469345 2006-08-07 23:20 libmozembed-linux-gtk1.2.so
-rw-r--r-- 1 user users  455336 2006-08-07 23:20 libmozembed-linux-gtk2.so
-rw-r--r-- 1 user users   19779 2006-08-07 23:20 libtray.so
drwxr-xr-x 2 user users    4096 2006-08-07 23:20 license/
drwxr-xr-x 2 user users    4096 2006-08-07 23:20 log/
-rw-r--r-- 1 user users    9431 2006-08-07 23:20 mozembed-linux-gtk1.2
-rw-r--r-- 1 user users    9467 2006-08-07 23:20 mozembed-linux-gtk2
-rw-r--r-- 1 user users 5751676 2006-08-07 23:20 paros.jar
-rw-r--r-- 1 user users   13206 2006-08-07 23:20 paros_logo.ico
drwxr-xr-x 2 user users    4096 2006-08-07 23:20 plugin/
-rw-r--r-- 1 user users   11331 2006-08-07 23:20 release.txt
drwxr-xr-x 2 user users    4096 2006-08-07 23:20 session/
-rw-r--r-- 1 user users      20 2006-08-07 23:20 startserver.bat
-rw-r--r-- 1 user users     171 2006-08-07 23:20 startserver.sh
-rw-r--r-- 1 user users   57344 2006-08-07 23:20 tray.dll
drwxr-xr-x 2 user users    4096 2006-08-07 23:20 xml/
And here are the permissions for the local-utils folder:
Code:
drwx------ 5 user users 4096 2006-03-23 08:07 john-1.7.0.2/
drwxr-xr-x 9 user users 4096 2008-06-02 03:33 paros/
Note that I have a similar set up with John,and that alias works fine from anywhere. I tried making the shell script and the paros.jar file executable, but that did not work.

Thoughts?

Last edited by timmit; 06-02-2008 at 04:52 AM.
 
Old 06-02-2008, 06:19 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,744
Blog Entries: 54

Rep: Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973Reputation: 2973
alias paros='cd /home/user/local-utils/paros && ./startserver.sh' ?
 
Old 06-02-2008, 07:04 AM   #3
timmit
Member
 
Registered: Oct 2007
Location: Illinois
Distribution: Slackware 12.0
Posts: 46
Blog Entries: 1

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by unSpawn View Post
alias paros='cd /home/user/local-utils/paros && ./startserver.sh' ?
Yeah,that job the job done. I figured a work around like that would work, but obviously there is something I do not understand about permissions. Basically I just want to understand that :-p. Thanks for the fix though :-).
 
Old 06-02-2008, 08:33 AM   #4
merer
LQ Newbie
 
Registered: Jul 2007
Location: Vilnius,Lithuania
Distribution: Slackware 12.2
Posts: 20

Rep: Reputation: 1
It's not a permission issue. Your original command ran startserver.sh script from your current directory. It probably used some relative paths, so it couldn't find whatever it was looking for in the current directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell Script with Root Permission gjagadish Linux - Security 2 02-15-2006 09:38 AM
script execution - file/directory permission issue serksimper Linux - Enterprise 1 08-10-2005 04:01 PM
/etc/init.d/cyrus Shell Script 'Permission denied' ServerStorm Linux - Software 3 01-20-2005 12:04 AM
Probs running .jar file via CGI script under Apache blimbo Programming 1 07-22-2004 11:29 AM
issue with shell script chupacabra Linux - General 3 10-18-2002 09:12 PM


All times are GMT -5. The time now is 04:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration