I have created different users and set their home directories to particular folders. I have limited the users' access other than their directories. How could I limit users from writing data?

  • Write data to where? – Naveen Jun 4 '14 at 14:02
  • it just storing data may be i create file or any thing that consumes disk space – Dipak Jun 4 '14 at 14:06
  • Not allowing writing data in their own HOME directory will break their login (files need to be written in /home/$USER by the system with the user name. UNLESS we are talking about ftp I would not touch /HOME/$USER – Rinzwind Jun 4 '14 at 14:06
  • Rinzwind, it's not that big of a deal. Not every file needs to be kept writeable. As long as files are still kept readable to the user, all works out fine. – mmstick Jun 4 '14 at 14:10
  • 3
    It sounds like the question is about user/group disk quotas – steeldriver Jun 4 '14 at 14:13

See the chmod and chown command using man. You can modify files and directories so that they belong to root and are not writeable by anyone other than root, for example.

Example (as root): chown root:root file

  • 1
    Careful: do this in /home or with some files in /home/$USER/ and the user will not be able to login. – Rinzwind Jun 4 '14 at 14:08
  • Laziest answer I've ever seen on AskUbuntu! – Naveen Jun 4 '14 at 14:11
  • Who needs a wall of text when a concise answer is all you need? There's a difference between laziness and being concise. – mmstick Jun 4 '14 at 14:15

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