[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

pam_umask.so and scp have serious problems (can't handle shared folder)



Hi,

I have serious problem setting up a shared folder "/home/shared" for my
whole family to store pictures etc.

After reading http://wiki.debian.org/DebianDesktopHowTo I managed to put
the (hopefully) correct config option in /etc/pam.d/common-session

  amd700:/etc/pam.d# egrep -v '^#.*' /etc/pam.d/common-session
  session required        pam_unix.so
  session optional        pam_umask.so umask=002

This works for all normal a normal login on console. I get

  peter@amd700:~$ umask
  0002

Obviously, creating new files in /home/shared

  amd700:/home# ls -ald /home/shared/
  drwxrws--- 2 root family 4096 2007-01-08 21:05 /home/shared/

  amd700:/home$ cd /home/shared/
  peter@amd700:/home/shared$ touch test
  peter@amd700:/home/shared$ ls -al
  insgesamt 8
  drwxrws---  2 root  family 4096 2007-01-08 21:29 .
  drwxr-xr-x 10 root  root   4096 2007-01-08 20:19 ..
  -rw-rw-r--  1 peter family    0 2007-01-08 21:29 test

works as expected.

Copying a file via scp does not!!!

  scp test2 amd700:/home/shared
  [...]
  peter@amd700:/home/shared$ ls -al
  insgesamt 12
  drwxrws---  2 root  family 4096 2007-01-08 21:34 .
  drwxr-xr-x 10 root  root   4096 2007-01-08 20:19 ..
  -rw-rw-r--  1 peter family    0 2007-01-08 21:29 test
  -rw-r-----  1 peter family   70 2007-01-08 21:34 test2

Can someone please point me to the right direction what's wrong?

Greetings,
  Peter Baumann


This is a freshly installed Debian Etch.

xp:~$ ssh amd700 umask
peter@amd700's password:
0002

amd700:/etc/pam.d# grep common-session /etc/pam.d/ssh
@include common-session



Reply to: