Friday, July 3, 2015

Crontab: Permission denied


If you get "Permission denied" error message while adding any cron entry, follow these steps to fix the error.


[user@RHEL5 ~]$ crontab -e
-bash: /usr/bin/crontab: Permission denied




1. Check whether the user name is present in /etc/cron.deny file. If yes remove it.

2. Check whether /etc/cron.allow file is present. If yes, add user name to the file.

3. Check for cron related entry in PAM configuration  file.

    [user@RHEL5 ~]$grep "^+.*cron" /etc/security/access.conf

4. Change the file permission of crontab file

    #chmod 4775 /usr/bin/crontab

Wednesday, July 1, 2015

Reconnecting to DevStack screen and restarting the services


When the ./stack.sh is run, it uses screen application to create multiple sessions. Once the DevStack is up and running, you can reconnect to screen and gain control by running

stack@ubuntuvm:~/devstack$ ./rejoin-stack.sh




To view the list of tabs, CTRL+a and then press ". 


Select any tab by pressing the arrow key and hit Enter. To stop the process by pressing CTRL+c and press UP arrow key to view the command. Press enter to start the process again.



To close the screen, press CTRL+A+D.

You can also use screen command instead of rejoin-stack.sh



Screen commands

Next Tab          CTRL+a+n
Previous Tab    CTRL+a+b
Close screen     CTRL+a+d
List tabs           CTRL+a+"