1

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 ?

6
  • 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, 2012 at 19:15
  • @Rinzwind: You are saying permissions can't be applied for a single user, I need a group ?
    – WitchCraft
    Aug 4, 2012 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, 2012 at 21:31
  • The bindfs program can help you. You should try it.
    – Lucio
    Aug 4, 2012 at 21:46
  • @Lucio: BindFS is very interesting, but not what I search.
    – WitchCraft
    Aug 4, 2012 at 23:16

1 Answer 1

0

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .