Giving a single user write permissions
Solution 1:
If filesystem is mounted with the acl
option (default in ext4 in any modern Ubuntu - if not, add it to /etc/fstab
), you can use setfacl
:
setfacl -m u:USERNAME:r FILENAME
would give user USERNAME read access to FILENAME.
Solution 2:
By default in Ubuntu every user belongs to a group with the same name, i.e. hannesh:hannesh.
You can make the folder owned by root:hannesh, and give it permissions like 770 though I see no reason for it to be owned by root if you want the user to be able to write there - why doesn't hannesh:hannesh suit you? Root would be able to write in that folder anyway.
Also have a read about the sticky bit if root creates files in that directory which need to be writeable by the user.