Results 1 to 3 of 3
  1. #1

    /bin/bash problem with RH 7.3

    When I try to login as a non-root user on my new Red Hat box I get the error:
    /bin/bash: Permission denied
    Connection to db closed.

    Looking in /bin I see that bash (along with all the other shells) is owned by root group shells with no read or execute permission for others:
    -r-xr-x--- 1 root shell 541096 Apr 12 12:09 bash

    Trying to chmod the file brings another error:
    chmod o+rx bash
    chmod: changing permissions of `bash': Operation not permitted

    Now I've never had a linux box tell me that I couldn't chmod something when I was logged in as root. I thought perhaps the shell wouldn't let me chmod the shell I was using so I tried to chmod tcsh which has the same permissions but got the same result.

    I have 3 questions:
    1) why the heck is it setup this way in the first place
    2) why won't it let me chmod the files
    3) what do I do to fix it

    Luckily I'm just using the machine to run a db and don't need to login frequently or have users login directly but it's a bit of a hassle to not be able to login as a non root user.

  2. #2
    Join Date
    Jun 2001

    I've see this before. I can guess where you box is hosted

    This is a security measure. Just make any accounts that you want to be able to login have the group shell as one of their secondary groups.

    The reason that you can't change the permissions is because the immutable bit is set. While this is set noone (not even root) can change the file.

    to set:

    chattr +i file

    to clear:

    chattr -i file

    chattr man page.

    Umbra Hosting
    cPanel | Softaculous | CloudLinux | R1Soft | Ksplice
    Web Hosting, Reseller Hosting, VPS, Dedicated Servers, Colocation

  3. #3
    Sweet. That was it. Thanks much.

    It's a shame that the host neglected to inform me of this. I'm not as up on linux these days as I could be.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts