LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-29-2007, 06:12 PM   #1
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Rep: Reputation: 30
Exclamation null permissions on .ssh dir of a debian etch


I run a debian etch 2.6.18-4-686 and it's not the fist time after i have set permissions in my user home dir .ssh 0600 to see this:
Code:
gabrix@www:~$ ls -la .ssh/
total 0
?--------- ? ? ? ?                ? .ssh/.
?--------- ? ? ? ?                ? .ssh/..
?--------- ? ? ? ?                ? .ssh/authorized_keys
?--------- ? ? ? ?                ? .ssh/known_hosts
This after i ssh-keygened sshkeys and set permissions :
Code:
root@www:~# chmod 0600 .ssh/ -R
I show you some more :
Setting keys up ....
Quote:
gabrix@www:~$ ssh-keygen -t dsa
Generating public/private dsa key pair.
Enter file in which to save the key (/home/gabrix/.ssh/id_dsa):
Created directory '/home/gabrix/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
open /home/gabrix/.ssh/id_dsa failed: Permission denied.
Saving the key failed: /home/gabrix/.ssh/id_dsa.
ok because the permissions on the newly created .ssh dir is:
Quote:
d--------- 2 gabrix gabrix 4096 2007-05-30 02:04 .ssh
I try to adjust permissions with chmod as root in my user dir ...
Quote:
chmod 755 .ssh/
i switch back to the dir's user
Quote:
gabrix@www:~$ ls -la .ssh/
total 16
drwxr-xr-x 2 gabrix gabrix 4096 2007-05-30 02:10 .
drwxr-xr-x 45 gabrix gabrix 4096 2007-05-30 02:04 ..
---------- 1 gabrix gabrix 672 2007-05-30 02:10 id_dsa
----r--r-- 1 gabrix gabrix 600 2007-05-30 02:10 id_dsa.pub
... and again:
Quote:
sudo chmod 600 .ssh/ -R
result:
Quote:
gabrix@www:~$ ls -la .ssh/
total 0
?--------- ? ? ? ? ? .ssh/.
?--------- ? ? ? ? ? .ssh/..
?--------- ? ? ? ? ? .ssh/id_dsa
?--------- ? ? ? ? ? .ssh/id_dsa.pub
What's going on ???????

Last edited by gabsik; 05-29-2007 at 07:20 PM.
 
Old 05-29-2007, 11:34 PM   #2
HappyTux
Senior Member
 
Registered: Mar 2003
Location: Nova Scotia, Canada
Distribution: Debian AMD64
Posts: 4,170

Rep: Reputation: 244Reputation: 244Reputation: 244
I haven't a clue why your doing what you are there setting the permissions like that I always used the command chmod -R .... with the option first plus when you are setting you should be using 0700. and you do not do it recursively anyways the files in the directory should be created with the proper permissions. What you probably should do is use the 0700 for the directory permission having deleted the files in .ssh directory letting them be recreated make sure you do a chown username:username .ssh as well to have your owner set properly.

Code:
>$  ls -la .ssh/
total 7
drwx------  2 stephen stephen   80 2006-10-16 01:07 .
drwxr-xr-x 56 stephen stephen 3464 2007-05-27 17:51 ..
-rw-r--r--  1 stephen stephen 1694 2007-04-19 11:56 known_hosts
 
Old 05-31-2007, 07:23 AM   #3
gabsik
Member
 
Registered: Dec 2005
Location: This planet
Distribution: Debian,Xubuntu
Posts: 567

Original Poster
Rep: Reputation: 30
Tanks i think i got over this issue .It was my way to set -R on chmod ... i think ... !!!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
update Debian testing etch RC1 to etch stable cccc Debian 11 01-08-2007 10:02 PM
/dev/null permissions irvken Linux - Software 2 11-27-2006 03:03 AM
Compress dir keep file/dir permissions powadha Linux - General 1 11-14-2006 07:07 PM
Debian Etch netinstall boot floppy with ssh fakie_flip Debian 0 08-08-2006 05:51 PM
Permissions in Debian - sudo works, su doesn't (etch/64Studio) greennick Linux - Software 0 09-12-2005 03:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration