LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-04-2012, 09:39 AM   #1
nishanthp82
LQ Newbie
 
Registered: Nov 2011
Posts: 15

Rep: Reputation: Disabled
shell error:cd: restricted shell - can't cd


when i try to execuete a script with param iam getting this error

#### Calling parm file.
. /psoft/batch/fsdev/scripts/parms/test_ae.parm
./batchae7: /psoft/batch/fsdev/scripts/parms/test_ae.parm[3]: cd: restricted shell - can't cd

./batchae7: /psoft/batch/fsdev/scripts/parms/test_ae.parm[13]: /psoft/batch/fsdev/log_output/grepfile.test_ae: restricted

./batchae7: /psoft/batch/fsdev/scripts/parms/test_ae.parm[14]: /psoft/batch: restricted

Any thoughts why iam facing this?
 
Old 04-04-2012, 10:08 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,

You either choose to use a restricted shell yourself (bash -r for example). In That case the solution is simple: Don't use the -r option

Or you are getting a restricted shell/environment by your Provider/IT department/School/etc/etc for security reasons. In that case: You are probably out of luck, but you can ask them if you could get an unrestricted/less restricted shell/environment (answer will probably be: No!).

Also have a look here: Restricted shell

Hope this helps.
 
Old 04-04-2012, 11:12 AM   #3
nishanthp82
LQ Newbie
 
Registered: Nov 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
Thanks for your reply

But we are not using any restricted shell.i can see iam in rush shell.

how to check if iam in restricted shell or not?
how to come out of restricted shell?

i see my home dir /psoft/batch are in differnt group than other dir?will this be a issue?
 
Old 04-04-2012, 11:38 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
Hi,
Quote:
Originally Posted by nishanthp82 View Post
Thanks for your reply

But we are not using any restricted shell.i can see iam in rush shell.
Yes, you are using a restricted shell
rush shell => restricted user shell

Have a look here: GNU Rush

Quote:
how to come out of restricted shell?
You don't, that is the point of the restriction.

Quote:
i see my home dir /psoft/batch are in differnt group than other dir?will this be a issue?
Permissions can be a problem, but if I look at your original post I see this:
Quote:
./batchae7: /psoft/batch/fsdev/scripts/parms/test_ae.parm[3]: cd: restricted shell - can't cd
./batchae7: /psoft/batch/fsdev/scripts/parms/test_ae.parm[13]: /psoft/batch/fsdev/log_output/grepfile.test_ae: restricted
./batchae7: /psoft/batch/fsdev/scripts/parms/test_ae.parm[14]: /psoft/batch: restricted
All point to a violation of the shell and not a permissions problem.

Here a link to the rush man page. It does tell you a lot about what is and isn't allowed.

Hope this helps.
 
1 members found this post helpful.
Old 04-04-2012, 12:28 PM   #5
nishanthp82
LQ Newbie
 
Registered: Nov 2011
Posts: 15

Original Poster
Rep: Reputation: Disabled
ok.Thanks for your detailed explanation

But iam using the same shell(rush) in differnt server ,the script is executing fine without any issues.

Any idea why script is executing success?
 
  


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
[SOLVED] Needed to be $HOME/.bashrc disabled when user shell is 'rbash' (restricted shell) mgumbau Linux - General 2 06-16-2011 07:17 AM
restricted shell sulekha Linux - Security 2 07-09-2008 04:00 PM
Restricted Shell help rtaft Linux - Security 3 04-01-2008 01:51 PM
Restricted shell Rocket01 Linux - Software 3 01-23-2003 10:37 PM
Restricted Shell johnlee Linux - Security 3 10-29-2001 09:02 AM


All times are GMT -5. The time now is 07:59 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration