Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

13
  • AFAIK unlink() deletes file. Is that exactly what you want? Commented Jun 3, 2014 at 21:42
  • Yes in that case, to check the owner of testfile. Symlink works in the first and fails in the second, yet both are run by the same user Commented Jun 3, 2014 at 21:43
  • Ok, see. Then try to check selinux and pwd, may be. Commented Jun 3, 2014 at 21:50
  • the command setenforce doesnt exist so im fairly sure its not there Commented Jun 3, 2014 at 21:57
  • 1
    can you show us the code that actually creates the symlink? I reckon this is probably a lack of absolute paths issue or similar. This is why I always write code paths relative paths to __DIR__. If you are trying to always create the symlink in the cwd, then it will fail whenever executing user is currently in a directory he cannot write to. Commented Jun 23, 2014 at 23:02