LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-14-2014, 01:29 PM   #1
gnome1919
LQ Newbie
 
Registered: Jul 2014
Posts: 8

Rep: Reputation: 0
Question Problem with running bash script on open terminal window!


Hi,
I wrote a bash scrip that download files from internet and then run a software called Wavewatch to do some process using downloaded files. The problem is that when I run the script using crontab (which runs in background without any open terminal window), everything goes well, but when I run the command manually in a Terminal window, a software module (called ww3_outp) returns an error complaining about writing problem of /dev/pts/0 looks like this:

Code:
forrtl: severe (38): error during write, unit 6, file /dev/pts/0
Image              PC                Routine            Line        Source             
ww3_outp           00000000004AFEDB  Unknown               Unknown  Unknown
ww3_outp           0000000000408A6A  Unknown               Unknown  Unknown
ww3_outp           0000000000408236  Unknown               Unknown  Unknown
libc.so.6          000000347D81ED1D  Unknown               Unknown  Unknown
ww3_outp           0000000000408129  Unknown               Unknown  Unknown
I looked to /dev/pts/ and found that with each instance of Terminal window a file named by a number (0,1,2,...) is produced which can't be edited or deleted even with root permission. It seems so weird, any idea?

Last edited by gnome1919; 07-15-2014 at 07:00 AM. Reason: Correcting /etc/pts to /dev/pts
 
Old 07-15-2014, 06:53 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,882
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Hard to figure what exactly the problem is without seeing your script. Also can you show a long listing of these directories which have their permissions screwed up?

Please post your script as well as a long listing of your /etc/pts directory within [code][/code] tags.

If you'd rather self analyze:

Sounds sort of like Wave Watch III uses that directory for writing information, be that logs or data. It may be that when you run it as a cron that user permissions are one thing and when you run it directly from a terminal program that the user permissions are your login and that there's a conflict.

Something to do is to echo the environment information to a log file from within your script that's running ww-iii.
Code:
env >> /home/<your-user>/logfile.txt;
And finally check the permissions and ownership for your /etc/pts directory; that's not a normal system directory as far as I know, therefore it may have been created by the ww-iii program; and again it may have been given ownership and credentials via the cron job; and be something which doesn't allow other users to access it.
 
Old 07-15-2014, 07:02 AM   #3
gnome1919
LQ Newbie
 
Registered: Jul 2014
Posts: 8

Original Poster
Rep: Reputation: 0
Thanks for your reply rtmistler,

I found another post related to my question, let us continue this discussion there.
Thanks
 
  


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] Writing a script that will open a terminal window and run another script jeffery1 Linux - General 5 02-16-2013 03:30 PM
how can I resume a bash script after a reboot in a terminal window? ziggycat Ubuntu 3 04-07-2011 03:30 AM
hide terminal window whn running script tank junior Linux - Newbie 1 03-14-2011 12:24 PM
How can a bash script findout the width of the terminal window alex.e.c Linux - Software 2 10-14-2004 11:20 AM
bash script - open new window running a command zippity Linux - Newbie 1 07-13-2004 11:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:12 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
Open Source Consulting | Domain Registration