title: Symlink giving "Permission denied"... to root
body: <p>I wrote a simple script to automate creating a symbolic link.</p>
  
  <pre><code>#!/pseudo
  today = "/tmp/" + date("Y-m-d")
  exec("ln -sf " + today + " /tmp/today")
  </code></pre>
  
  <p>Simple enough; get today's date and make a symlink. Ideally run after midnight with <code>-f</code> so it just updates it in-place.</p>
  
  <p>This works just fine! ...for my user.</p>
  
  <pre><code>xkeeper /tmp$ ls -ltr
  drwxrwxrwx  xkeeper   xkeeper   2014-10-21
  lrwxrwxrwx  xkeeper   xkeeper   today -&gt; /tmp/2014-10-21/
  
  xkeeper /tmp$ cd today
  xkeeper /tmp/today$ cd ..
  </code></pre>
  
  <p>Notice that it works fine, all the permissions are world-readable, everything looks good.</p>
  
  <p>But if someone else wants to use this link (we'll say, root, but any other user has this problem), something very strange happens:</p>
  
  <pre><code>root /tmp# cd today
  bash: cd: today: Permission denied
  </code></pre>
  
  <p>I am at a complete loss as to why this is. I've also tried creating the links with <code>ln -s -n -f</code> (not that "<code>--no-dereferencing</code>" is very well-explained), but the same issue appears.</p>