analytic

Wednesday, 29 May 2013

Authentication refused: bad ownership or modes for file

This is one of the common error many system administrators face after configuring password-less ssh (key based authentication between two unix servers. The password-less ssh does not work and (ssh asks for the user password) and /var/log/messages file would show an error message “sshd[15426]:Authentication refused: bad ownership or modes for file”. Most of the times this error comes due to incorrect permissions on $HOME/.ssh/authorized_keys file. Make sure the permissions of $HOME/.ssh/authorized_keys file and other important files is as given...

Immutable Files in Linux

Recently I came across a situation. I was trying to delete a configuration file in Linux and got error “rm: cannot remove `path/filename’: Operation not permitted”.  I was logged in as root but even though I was neither able to change the contents of file nor able to delete it.  I checked the ownership and permissions on the file and found that the file is owned by root user and permissions are 644 which are the default permission when you create a new file. [root@vcsnode1 ~]# ls -l /etc/configfile-rw-r–r– 1 root root 0 Jan 26 08:45...