Question:
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 ?
Question:
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 ?
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.
From http://www.yolinux.com/TUTORIALS/LinuxTutorialManagingGroups.html:
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 http://www.linux-tutorial.info/modules.php?name=ManPage&sec=1&manpage=setfacl
setfacl -m u:bind:rw /var/log/DESIRED_FILENAME_HERE
Also, modern Linux is using ext4.
So note this:
http://www.linuxquestions.org/questions/linux-general-1/how-to-enable-acl-support-on-ext4-915306/
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