1

I'm just trying to get a DNS server off the ground and most of the guides I followed online tells me to create zone files in /etc/bind/zones or just /etc/bind/. But I want to use a different path, /server/zones. I changed the permissions and owners of the folders with:

chmod -R 640 /servers and chown -R root:bind /servers as well as adding the line "/servers/** rw," to /etc/apparmor.d/usr.bin.named

When I check my logs I get a permission denied message for the directory /servers/zones...

1 Answer 1

0

chmod -R 640 /servers will remove the execute bit from the /servers directory. Non-root users need execute permissions on directories in order access their contents.

Instead, try using the X symbolic mode which will set the recursively set executable bit on directories, but not files:

chmod -R u=rwX,g=rX,o= /servers

From the chmod man page:

The letters rwxXst select file mode bits for the affected users: read (r), write (w), execute (or search for directories) (x), execute/search only if the file is a directory or already has execute permission for some user (X),

4
  • Can you point to the supporting info for where that command would only affect directories and not files? I always used a find to do this sort of operation but am always in search of a "new" trick =) Jul 22, 2015 at 12:47
  • 1
    Added a reference to the chmod man page. The X can affect files, but only if they're are already execute privileges on another user. Jul 22, 2015 at 14:14
  • ahh, thank you...always good to learn another new tip =) Jul 22, 2015 at 15:07
  • I see, I didn't Bind would need exec access, just read & write.
    – OrangesV
    Jul 22, 2015 at 17:59

You must log in to answer this question.

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