Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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 need to give file create, read, write and delete access to /var/log for user bind only.
How can I do that, short of allowing read and write and delete access for everybody ?

share|improve this question
you probably mean 'sudo account' and 'bind'? if so create a group that holds these 2 and set the file to that group. – Rinzwind Aug 4 '12 at 19:15
@Rinzwind: You are saying permissions can't be applied for a single user, I need a group ? – WitchCraft Aug 4 '12 at 20:59
nah, but you might want to keep admin to be able to be able to do anything with it. – Rinzwind Aug 4 '12 at 21:31
The bindfs program can help you. You should try it. – Lucio Aug 4 '12 at 21:46
@Lucio: BindFS is very interesting, but not what I search. – WitchCraft Aug 4 '12 at 23:16
up vote 0 down vote accepted

Never mind, I found the answer myself:
This is not possible with standard Unix-Permissions.

However, that does not mean it's not possible on Linux.

Access Control Lists (ACLs) are applied to files and directories. ACL behavior is defined by IEEE's POSIX 1003.1e draft and supports control/access of signals, TCP/IP ports (below 1024), raw sockets, ... ACLs are an addition to the standard Unix file permissions (r,w,x,-) for User, Group, and Other for read, write, execute and deny permissions. ACLs give users and administrators flexibility and direct fine-grained control over who can read, write, and execute files.

And further:

The Linux 2.6 kernel (beginning with Fedora Core 2) supports ACLs for EXT2, EXT3, XFS, JFS, and ReiserFS file systems.

And from

 setfacl -m u:bind:rw /var/log/DESIRED_FILENAME_HERE

Also, modern Linux is using ext4.

So note this:

You need to remount the mount point -- in this specific case, the root / filesystem, not just the desired directory. In other words, try

sudo mount -o remount,acl /

For future, change the line in /etc/fstab to

UUID=66eeee3e-b860-41b0-abf7-074c0e08420e / ext4 relatime,acl,errors=remount-ro 0 1
share|improve this answer

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.