Warning: Table './centosfo_drupal/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:379:\"Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired\nquery: INSERT into captcha_sessions (uid, sid, ip_address, timestamp, form_id, solution, status, attempts) VALUES (0, 'af418f5543554f56917503f3c8078845', '54.80.36.69', 1412172828, 'user_login_block', '546cc8b6c5e7f39386bdbb5bdfbec96b', 0, 0)\";s:5:\"%file\";s:64:\"/home/centosfo/public_html/sites/all/modules/captcha/captcha.inc\";s:5:\"%line\";i:99;}', 3, '', 'http://centosforge.com/node/ in /home/centosfo/public_html/includes/database.mysql.inc on line 135

Warning: Table './centosfo_drupal/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:195:\"Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired\nquery: UPDATE captcha_sessions SET token='d5903c0f229b61737577a6430aa71c10' WHERE csid=0\";s:5:\"%file\";s:67:\"/home/centosfo/public_html/sites/all/modules/captcha/captcha.module\";s:5:\"%line\";i:216;}', 3, '', 'http://centosforge.com/node/how-solve-cannot-open-your-terminal-devpts1-please-check', '', '54.80.36.69', 1412172828) in /home/centosfo/public_html/includes/database.mysql.inc on line 135

Warning: Table './centosfo_drupal/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:154:\"Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired\nquery: SELECT status FROM captcha_sessions WHERE csid = 0\";s:5:\"%file\";s:64:\"/home/centosfo/public_html/sites/all/modules/captcha/captcha.inc\";s:5:\"%line\";i:129;}', 3, '', 'http://centosforge.com/node/how-solve-cannot-open-your-terminal-devpts1-please-check', '', '54.80.36.69', 1412172828) in /home/centosfo/public_html/includes/database.mysql.inc on line 135

Warning: Table './centosfo_drupal/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:154:\"Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired\nquery: SELECT status FROM captcha_sessions WHERE csid = 0\";s:5:\"%file\";s:64:\"/home/centosfo/public_html/sites/all/modules/captcha/captcha.inc\";s:5:\"%line\";i:129;}', 3, '', 'http://centosforge.com/node/how-solve-cannot-open-your-terminal-devpts1-please-check', '', '54.80.36.69', 1412172828) in /home/centosfo/public_html/includes/database.mysql.inc on line 135

Warning: Table './centosfo_drupal/watchdog' is marked as crashed and should be repaired query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:188:\"Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired\nquery: UPDATE captcha_sessions SET timestamp=1412172828, solution='' WHERE csid=0\";s:5:\"%file\";s:64:\"/home/centosfo/public_html/sites/all/modules/captcha/captcha.inc\";s:5:\"%line\";i:111;}', 3, '', 'http://centosforge.com/node/how-solve-cannot-open-your-terminal-devpts1-please-check', '', '54.80.36.69', 1412172828) in /home/centosfo/public_html/includes/database.mysql.inc on line 135
How to solve "Cannot open your terminal '/dev/pts/1' - please check." | CentOSForge.com
  • user warning: Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired query: INSERT into captcha_sessions (uid, sid, ip_address, timestamp, form_id, solution, status, attempts) VALUES (0, 'af418f5543554f56917503f3c8078845', '54.80.36.69', 1412172828, 'user_login_block', '546cc8b6c5e7f39386bdbb5bdfbec96b', 0, 0) in /home/centosfo/public_html/sites/all/modules/captcha/captcha.inc on line 99.
  • user warning: Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired query: UPDATE captcha_sessions SET token='d5903c0f229b61737577a6430aa71c10' WHERE csid=0 in /home/centosfo/public_html/sites/all/modules/captcha/captcha.module on line 216.
  • user warning: Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired query: SELECT status FROM captcha_sessions WHERE csid = 0 in /home/centosfo/public_html/sites/all/modules/captcha/captcha.inc on line 129.
  • user warning: Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired query: SELECT status FROM captcha_sessions WHERE csid = 0 in /home/centosfo/public_html/sites/all/modules/captcha/captcha.inc on line 129.
  • user warning: Table './centosfo_drupal/captcha_sessions' is marked as crashed and should be repaired query: UPDATE captcha_sessions SET timestamp=1412172828, solution='' WHERE csid=0 in /home/centosfo/public_html/sites/all/modules/captcha/captcha.inc on line 111.

How to solve "Cannot open your terminal '/dev/pts/1' - please check."

Submitted by Shoel on Mon, 06/28/2010 - 17:23

It is quite common to create a new unprivileged user, su to it from a root shell, attempt to open a "screen" and end up with the following error: "Cannot open your terminal '/dev/pts/1' - please check." (or similar). If you are looking for an explanation or fix - this might help you.

For the sake of demonstration, I have logged in to a CentOS server using the root user directly. If we check the permissions of the terminal in question, we'll see something along the lines of this:

ls -l /dev/pts/1
crw--w---- 1 root tty 136, 1 Jun 28 16:12 /dev/pts/1

For the sake of security, the terminal is owned by the user who opened the session/shell - in this case root. If we su to a different user, it will still be owned by the original shell owner.

Some users, perhaps without understanding of what they are doing, suggest that you should simply change permissions of the terminal. That is however a bad idea. The permissions are set the way they are for a very good reason. If you allow any user access - you can effectively end up giving unprivileged users access to a privileged login shell (for an example that of a root account). That is a security risk, and something we generally want to avoid.

There are two simple ways of solving the issue without comprimising security.

The first one is fairly simple. Set a (strong) password for the user you would like to run screen as, and log in directly to that user. You will now be able to start up a screen, as you now have the appropriate permissions.

The alternative is:

  • Invoke the screen as root
  • In the screen session: change (su) to the user you would like to run things under..
  • Do stuff...
  • Detach from the screen.

This works because the root/superuser will still be able to access any user's tty.

Copyright © 2013 - CentOSForge.com