Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to create two user with only read permission to their home folder. And other new user which can read write and execute the file in above two user folders.

share|improve this question

This is not (easily) possible with linux as some files are written to the home directory (e.g. .xsession-errors or .bash_history).

You can create a new group and assign this group to the users that only read files. Then give the file permission rw-r----- to the files and assign the created greoup to the files. So the users can only read the files. Also you can give the permission rwxr-x--- and assign the group to all directories so that the users may not write files into directories.

share|improve this answer
I have to create user for sftp login. – Kalim Sayyed Jul 11 '13 at 8:58
@KalimSayyed and why should this users not be able to write? Should they only download files? – Uwe Plonus Jul 11 '13 at 9:11
yes..they only download files – Kalim Sayyed Jul 11 '13 at 9:51
@KalimSayyed I extended my answer accordingly. – Uwe Plonus Jul 11 '13 at 10:03
@KalimSayyed: Doesn't SFTP allow setting of different "home" directories where the user ends up on login? That would allow to set them to a read-only directory (for them). – Bobby Jul 11 '13 at 10:05

Your Answer


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.