home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / linux / 15914 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  2.8 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!ames!agate!doc.ic.ac.uk!uknet!comlab.ox.ac.uk!mbeattie
  2. From: mbeattie@black.ox.ac.uk (Malcolm Beattie)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: Can't run shell! (SLS) I'm loosing my hair!
  5. Message-ID: <1992Nov6.174043.2493@black.ox.ac.uk>
  6. Date: 6 Nov 92 17:40:43 GMT
  7. Organization: Oxford University Computing Service, 13 Banbury Rd, Oxford, U
  8. Lines: 63
  9. Originator: mbeattie@black
  10.  
  11. In article <1992Nov6.071803.15471@ugle.unit.no> hallvard@immhp1.marina.unit.no (Hallvard Paulsen) writes:
  12. >
  13. >
  14. >    This is driving me crazy!
  15. >
  16. >    I've got the SLS package (including the z?fix.taz files), and
  17. >there is now way I can do anything as a user. Well actually the errors I
  18. >get is:
  19. >
  20. >    shell-init:permission denied  (when I log in)
  21. >    pwd : permission denied       (every time i type a command)
  22. >
  23. >    But when I check it turns out that my commands (like creating files
  24. >deleting files and so on) are usually executed. The problem seems to 
  25. >be shell commands *only*. (that is since PS1="pwd"# I always get a
  26. >permission denied message)
  27. >
  28. >    So: How do I make the shell usable for users?
  29.  
  30. This sort of problem occurs when a user's home directory has its
  31. permissions set incorrectly, for example if the directory is not
  32. owned by the user and the permissions are rwx--x--x.
  33. Just before the shell gives its prompt, it may try to
  34. stat and read the current working directory, e.g. to put things
  35. in its prompt text. This causes errors such as you describe.
  36.  
  37. When you create a user, bloggs say, make sure after you create
  38. the home directory that you
  39. # chown bloggs ~bloggs
  40. (or chown bloggs.users ~bloggs or whatever) and then twiddle the
  41. permissions if you don't like them.
  42.  
  43. Notice that the problem would show up under most Unices only
  44. if the user *did* have execute permission but did *not* have
  45. read permission, because without execute permission, login
  46. realises in time and says something like
  47.    No home directory! logging in with home=/
  48. and puts you in the root directory. Does anyone know if the login
  49. that Linux (in particular, SLS) uses perhaps does the chdir
  50. *before* changing uid to the user and without checks? In that
  51. case, the above problem may show up even if the user's home
  52. directory was rwx------ and not owned by the user?
  53.  
  54. --Malcolm
  55.  
  56. >
  57. >
  58. >  \\___//
  59. >  |     |       Hallvard Paulsen, MSc
  60. >  |_____|       Research Engineer / Grad. Stud
  61. >  || o ||       Division of Machinery
  62. >  || \\||       NORWEGIAN MARINE TECHNOLOGY RESEARCH INSTITUTE
  63. >      \\        TEL : +47 (07)595522 
  64. >       o        FAX : +47 (07)595983
  65. >      //        EMAIL : hallvard.paulsen@imm.unit.no
  66. >     O     
  67.  
  68.  
  69. -- 
  70. Malcolm Beattie <mbeattie@black.ox.ac.uk> | I'm not a kernel hacker
  71. Oxford University Computing Services      | I'm a kernel hacker's mate
  72. 13 Banbury Road, Oxford, OX2 6NN (U.K.)   | And I'm only hacking kernels
  73. Tel: +44 865 273232 Fax: +44 865 273275   | 'Cos the kernel hacker's late
  74.