jail sendmail cannot chdir

Status
Not open for further replies.

Dusan

Guru
Joined
Jan 29, 2013
Messages
1,165
You need to edit the /etc/crontab file in the jail (or <jail_root>/<jail_name>/etc/crontab on the host, it is the same file). If this sounds too complex then just don't worry, nothing bad will happen if you leave it there.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
Should upgrading from 9.2 to 9.2.1 have removed this entry from crontab? Because in my case it didn't. I'm just playing around with a virtual machine before I upgrade my real box.
 

feleven

Dabbler
Joined
Feb 17, 2014
Messages
39
If you didn't get this sorted out, everdead, you need to edit the file "crontab" found in the jail/etc directory. In my case, I have Plex media server installed, so I have a Plex jail called "plexmediaserver_1". If you "View Jails", the FreeNAS GUI will list the jails you have installed, one for each PBI plugin. You click on the one you want to work with, it highlights, and at the bottom of the screen you'll see some icons pop up. The one on the far right should be a "shell" (like cmd.exe in Windoze) - click on it. If you're still with me, you're in the equivalent of Windoze DOS mode. :) Get used to this view, you're going to see it a lot from now on.

If you do a "ls" (list) command, you'll see a list of the directories in the jail, including a directory called "etc" where configuration text files live. Use "cd etc" to move to that directory.

If you use "ls" again, you'll see a file called "crontab". To see what's in that file, use "cat crontab", which basically catalogs or lists the files's contents to your screen non-destructively.

About mid-way down the file, you'll see a line like "*/11 * * * * operator /usr/libexec/save-entropy". You need to comment out that line, if I understood what Dusan said above.

NOTE: Before you go any further, go to the link below to learn the basics of using the "vi" text editor, something you're going to have to do sooner or later anyway. Its not hard, but its not what you're used to either - its not DOS's "edit".

Once you've read that info, especially the part at the start about moving and copying the original file so you aren't editing the original file with no backup, enter "vi crontab" (file opens), use your cursor key to scroll down to the first character in the line mentioned above, enter "ESC" (key) then "i" (insert mode), then type the "#" (comment) character, so that it now pushes the line one character to the right. The line should now read "#*/11 ... etc".

Then enter "ESC", ":wq" (write & quit, NOTE THE full colon ":" in front), and you're back to the command line. Finally, use "cat crontab" again to ensure the change you think you just made is actually what was done. If its what you expected, you're done. If its not, repeat the editing steps above, referring as needed to the link below - and GO SLOWLY.

Worst case, if you're lost, and the file is becoming an edited mess, just enter "ESC" and ":q" to quit. If you hadn't already used the ":wq" yet, then the file hasn't been changed and you can start over on it. If you've already saved changes to the file, then use "rm crontab" to delete it, "cp crontab.orig crontab" to make another fresh copy from the original file, and try editing it again.

If you already knew all this stuff, then I apologize for this wasted post. When you mentioned your history is with Windoze only, I assumed you might be unfamiliar with BSD editors and so on. Its a brave new world for us old microsoft vets. :)

http://www.freebsd.org/doc/en/articles/new-users/editing-text.html
 
Status
Not open for further replies.
Top