LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 02-26-2015, 09:09 AM   #1
agkagk
LQ Newbie
 
Registered: Feb 2015
Posts: 16

Rep: Reputation: Disabled
Unhappy Crontab error in AIX - unable to read from the file


Dear Friends,

Can any one help me out : I want to schedule a script in using crontab but when i enter command "crontab -e" from root it gives error "Unable to read from the file". Please help me out.

AGK.
 
Old 02-26-2015, 09:18 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by agkagk View Post
Dear Friends,
Can any one help me out : I want to schedule a script in using crontab but when i enter command "crontab -e" from root it gives error "Unable to read from the file". Please help me out.
You say you ran 'crontab -e' FROM root...did you mean AS root, or are you just executing that command from the "/" directory? Are there any existing cron entries? And are you able to continue after that message comes up?

It's possible that there IS no crontab, so you're creating one by entering your commands. If you're able to enter the editor, try putting something in there, and saving/exiting the editor, and try to run 'crontab -e' again.
 
Old 02-26-2015, 09:22 AM   #3
agkagk
LQ Newbie
 
Registered: Feb 2015
Posts: 16

Original Poster
Rep: Reputation: Disabled
Crontab error

Actually i executed command after switching to the root user. The file exist over there in the directory but i am facing this error while editing it. I am not allowed to edit the file.
 
Old 02-26-2015, 12:10 PM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by agkagk View Post
Actually i executed command after switching to the root user. The file exist over there in the directory but i am facing this error while editing it. I am not allowed to edit the file.
Sorry, not sure what you're saying here. What "file exist over there in the directory"??? What file, and what directory? And if you're root, you can edit ANYTHING on the system. Can you do an "ls -l" on that file??? Are there cron.allow and cron.deny files? Is root listed in cron.allow? If root is NOT listed in cron.allow (and that file exists), you WILL NOT be able to run/edit cron jobs. So edit the cron.allow file and add root if it's not there already.

The AIX/IBM website has much on cron:
http://www-01.ibm.com/support/knowle...%2F1-2-0-2-149
 
Old 02-27-2015, 03:15 AM   #5
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,863
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
'crontab -e' invokes your default editor. Provided your EDITOR environment variable is properly set (eg. export EDITOR=/usr/local/bin/mcedit or whatnot)
 
2 members found this post helpful.
Old 02-27-2015, 09:23 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,636

Rep: Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965Reputation: 7965
Quote:
Originally Posted by NevemTeve View Post
'crontab -e' invokes your default editor. Provided your EDITOR environment variable is properly set (eg. export EDITOR=/usr/local/bin/mcedit or whatnot)
Wow...VERY good catch, NevemTeve. You're 100% right, and I never thought of that as being part of the problem. That would have never occurred to me.
 
  


Reply



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
unable to open the crontab file on ubuntu server ? srinira2 Linux - Newbie 9 05-17-2013 04:06 AM
[SOLVED] crontab -e read-only filesystem error blainemiller Linux - Server 7 03-09-2011 05:32 PM
AIX crontab file logging wideyes AIX 1 10-06-2010 01:55 PM
Unable to mount USB, Error: device descriptor read/64, error -71 shredder12 Linux - Hardware 2 02-16-2010 12:45 AM
Unable to read config file............ FXRS Linux - Software 7 07-03-2003 08:36 AM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 08:34 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