fs.link, Error: EPERM, Operation not permitted

693 views
Skip to first unread message

kuno

unread,
Jan 26, 2011, 9:03:40 PM1/26/11
to nodejs
===============================================
> $mkdir /tmp/foo
> node
var fs = require('fs');
fs.link('/tmp/foo', '/tmp/bar', function(err) {if (err) {throw err;}})
>
[object Context]:1
err) {throw err;
^
Error: EPERM, Operation not permitted '/tmp/foo'
===============================================
what cause it?
Am I do it wrong?

Preston Guillory

unread,
Jan 27, 2011, 6:34:53 PM1/27/11
to nod...@googlegroups.com
fs.link() creates hard links, which shouldn't work on a directory.  You might be looking for fs.symlink().


--
You received this message because you are subscribed to the Google Groups "nodejs" group.
To post to this group, send email to nod...@googlegroups.com.
To unsubscribe from this group, send email to nodejs+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/nodejs?hl=en.


Reply all
Reply to author
Forward
0 new messages