📄 lchown.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!-- Copyright 1997 The Open Group, All Rights Reserved --><title>lchown</title></head><body bgcolor=white><center><font size=2>The Single UNIX ® Specification, Version 2<br>Copyright © 1997 The Open Group</font></center><hr size=2 noshade><h4><a name = "tag_000_007_299"> </a>NAME</h4><blockquote>lchown - change the owner and group of a symbolic link</blockquote><h4><a name = "tag_000_007_300"> </a>SYNOPSIS</h4><blockquote><pre><code>#include <<a href="unistd.h.html">unistd.h</a>>int lchown(const char *<i>path</i>, uid_t <i>owner</i>, gid_t <i>group</i>);</code></pre></blockquote><h4><a name = "tag_000_007_301"> </a>DESCRIPTION</h4><blockquote>The<i>lchown()</i>function has the same effect as<i><a href="chown.html">chown()</a></i>except in the case where the named file is a symbolic link. In this case<i>lchown()</i>changes the ownership of the symbolic link file itself, while<i><a href="chown.html">chown()</a></i>changes the ownership of the file or directory to which the symbolic linkrefers.</blockquote><h4><a name = "tag_000_007_302"> </a>RETURN VALUE</h4><blockquote>Upon successful completion,<i>lchown()</i>returns 0. Otherwise, it returns-1 and sets <i>errno</i> to indicate an error.</blockquote><h4><a name = "tag_000_007_303"> </a>ERRORS</h4><blockquote>The<i>lchown()</i>function will fail if:<dl compact><dt>[EACCES]<dd>Search permission is denied on a component of the path prefix of<i>path</i>.<dt>[EINVAL]<dd>The owner or group id is not a value supported by the implementation.<dt>[ENAMETOOLONG]<dd>The length of a pathname exceeds {PATH_MAX}, or pathnamecomponent is longer than {NAME_MAX}.<dt>[ENOENT]<dd>A component of <i>path</i> does not name an existing fileor <i>path</i> is an empty string.<dt>[ENOTDIR]<dd>A component of the path prefix of <i>path</i> is not a directory.<dt>[EOPNOTSUPP]<dd>The <i>path</i> argument names a symbolic link and the implementationdoes not support setting the owner or group of a symbolic link.<dt>[ELOOP]<dd>Too many symbolic links were encountered in resolving <i>path</i>.<dt>[EPERM]<dd>The effective user ID does not match the owner of the file and theprocess does not have appropriate privileges.<dt>[EROFS]<dd>The file resides on a read-only file system.</dl><p>The<i>lchown()</i>function may fail if:<dl compact><dt>[EIO]<dd>An I/O error occurred while reading or writing to the file system.<dt>[EINTR]<dd>A signal was caught during execution of the function.<dt>[ENAMETOOLONG]<dd>Pathname resolution of a symbolic link produced an intermediate result whoselength exceeds {PATH_MAX}.</dl></blockquote><h4><a name = "tag_000_007_304"> </a>EXAMPLES</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_305"> </a>APPLICATION USAGE</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_306"> </a>FUTURE DIRECTIONS</h4><blockquote>None.</blockquote><h4><a name = "tag_000_007_307"> </a>SEE ALSO</h4><blockquote><i><a href="chown.html">chown()</a></i>,<i><a href="symlink.html">symlink()</a></i>,<i><a href="unistd.h.html"><unistd.h></a></i>.</blockquote><hr size=2 noshade><center><font size=2>UNIX ® is a registered Trademark of The Open Group.<br>Copyright © 1997 The Open Group<br> [ <a href="../index.html">Main Index</a> | <a href="../xshix.html">XSH</a> | <a href="../xcuix.html">XCU</a> | <a href="../xbdix.html">XBD</a> | <a href="../cursesix.html">XCURSES</a> | <a href="../xnsix.html">XNS</a> ]</font></center><hr size=2 noshade></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -