Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How can I change the default chmod of new home directories (created with adduser)?

share|improve this question
    
@Rinzwind There are many good reasons someone might want to do this. They might want to grant group write permission, to share files with another trusted user added to the owner's primary group. Or they might want to lock down permissions, so by default users cannot read each other's files. –  Eliah Kagan Jul 13 '12 at 18:29

1 Answer 1

up vote 3 down vote accepted

If you want to change this permanently for all new users you need to alter

/etc/adduser.conf

Find the option DIR_MODE and set it to the permissions you want it to be.

In general you do not need write permissions for others (if you do set it to write access anyone from "outside" is able to delete that dir. That is if they can access your machine ofcourse).

share|improve this answer
    
A 6 or a 2 would be just about as bad (both give all users write permission). Also, this answer says how to change the permission of the directory once created, but the question is asking how to change the defaults, so the directory will be created initially with different permissions. –  Eliah Kagan Jul 13 '12 at 18:28
    
ah missed that :) edited it in :+ @EliahKagan –  Rinzwind Jul 13 '12 at 18:34

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.