Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I want files sent to my server using sftp and scp to be group-writable. How can I do that?

I tried using libpam-umask from http://wiki.debian.org/DebianDesktopHowTo but it didn't work.

EDIT: Is there any way I can troubleshoot pam? Is there a log? Is there any common reason why libpam-umask would not work? Do I have to install something?

share|improve this question

2 Answers 2

I think PAM reads the default umask from /etc/login.defs as of Debian 6.0, but I do not currently have access to a system to check on.

share|improve this answer
    
The comments in this file (on lenny) warn that the setting is only used by login, and that in general one should use the pam_umask module. –  Gilles Feb 17 '11 at 7:41
    
Right, on Squeeze I believe the comment says that pam_umask now reads the value from login.defs. –  Arrowmaster Feb 17 '11 at 16:15
    
I edited /etc/login.defs and it didn't work –  JoelFan Feb 18 '11 at 2:51
    
@JoelFan: default is #UseLogin no in Debian. So that's why it wouldn't work. –  0xC0000022L Mar 11 '11 at 13:51

Last time I had umask problem, trying to get all files in a directory to be group readable no matter who created them.

I got a bit stuck at first; I could set the sticky bit on the group, so all files had same group, but could find no way to set permissions consistently and correctly. The use of a cron job to regularly put it right did not seem satisfactory.

But then someone told be a solution. Posix ACLs, you can set in a directory properties(users,groups,permissions) to inherit.

You will probably need to install it, and new backup tools (the default ones don't always know about ACLs)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.