#, fuzzy msgid "" msgstr "" "Project-Id-Version: man-pages-l10n VERSION\n" "POT-Creation-Date: 2014-07-17 17:58+0900\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #. type: TH #: man-pages-posix/man3p/chmod.3p:2 #, no-wrap msgid "CHMOD" msgstr "" #. type: TH #: man-pages-posix/man3p/chmod.3p:2 #, no-wrap msgid "2013" msgstr "" #. type: TH #: man-pages-posix/man3p/chmod.3p:2 #, no-wrap msgid "IEEE/The Open Group" msgstr "" #. type: TH #: man-pages-posix/man3p/chmod.3p:2 #, no-wrap msgid "POSIX Programmer's Manual" msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:3 #, no-wrap msgid "PROLOG" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:8 msgid "" "This manual page is part of the POSIX Programmer's Manual. The Linux " "implementation of this interface may differ (consult the corresponding Linux " "manual page for details of Linux behavior), or the interface may not be " "implemented on Linux." msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:9 #, no-wrap msgid "NAME" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:12 msgid "" "chmod, fchmodat \\(em change mode of a file relative to directory file " "descriptor" msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:12 #, no-wrap msgid "SYNOPSIS" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:16 #, no-wrap msgid "#include Esys/stat.hE\n" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:19 #, no-wrap msgid "" "int chmod(const char *I, mode_t I);\n" "int fchmodat(int I, const char *I, mode_t I, int I);\n" msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:20 #, no-wrap msgid "DESCRIPTION" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:33 msgid "" "The I() function shall change S_ISUID, S_ISGID, S_ISVTX, and the " "file permission bits of the file named by the pathname pointed to by the " "I argument to the corresponding bits in the I argument. The " "application shall ensure that the effective user ID of the process matches " "the owner of the file or the process has appropriate privileges in order to " "do this." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:39 msgid "" "S_ISUID, S_ISGID, S_ISVTX, and the file permission bits are described in " "Isys/stat.hE>." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:46 msgid "" "If the calling process does not have appropriate privileges, and if the " "group ID of the file does not match the effective group ID or one of the " "supplementary group IDs and if the file is a regular file, bit S_ISGID (set-" "group-ID on execution) in the file's mode shall be cleared upon successful " "return from I()." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:51 msgid "" "Additional implementation-defined restrictions may cause the S_ISUID and " "S_ISGID bits in I to be ignored." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:55 msgid "" "Upon successful completion, I() shall mark for update the last file " "status change timestamp of the file." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:71 msgid "" "The I() function shall be equivalent to the I() function " "except in the case where I specifies a relative path. In this case the " "file to be changed is determined relative to the directory associated with " "the file descriptor I instead of the current working directory. If the " "file descriptor was opened without O_SEARCH, the function shall check " "whether directory searches are permitted using the current permissions of " "the directory underlying the file descriptor. If the file descriptor was " "opened with O_SEARCH, the function shall not perform the check." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:77 msgid "" "Values for I are constructed by a bitwise-inclusive OR of flags from " "the following list, defined in Ifcntl.hE>:" msgstr "" #. type: IP #: man-pages-posix/man3p/chmod.3p:77 #, no-wrap msgid "AT_SYMLINK_NOFOLLOW" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:82 msgid "" "If I names a symbolic link, then the mode of the symbolic link is " "changed." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:91 msgid "" "If I() is passed the special value AT_FDCWD in the I " "parameter, the current working directory shall be used. If also I is " "zero, the behavior shall be identical to a call to I()." msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:91 #, no-wrap msgid "RETURN VALUE" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:97 msgid "" "Upon successful completion, these functions shall return 0. Otherwise, " "these functions shall return \\(mi1 and set I to indicate the error. " "If \\(mi1 is returned, no change to the file mode occurs." msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:97 #, no-wrap msgid "ERRORS" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:99 msgid "These functions shall fail if:" msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:99 man-pages-posix/man3p/chmod.3p:141 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:102 msgid "Search permission is denied on a component of the path prefix." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:102 man-pages-posix/man3p/chmod.3p:173 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:107 msgid "" "A loop exists in symbolic links encountered during resolution of the I " "argument." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:107 man-pages-posix/man3p/chmod.3p:180 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:112 msgid "The length of a component of a pathname is longer than {NAME_MAX}." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:112 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:119 msgid "" "A component of I does not name an existing file or I is an empty " "string." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:119 man-pages-posix/man3p/chmod.3p:156 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:130 msgid "" "A component of the path prefix names an existing file that is neither a " "directory nor a symbolic link to a directory, or the I argument " "contains at least one non-EslashE character and ends with one or " "more trailing EslashE characters and the last pathname component " "names an existing file that is neither a directory nor a symbolic link to a " "directory." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:130 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:134 msgid "" "The effective user ID does not match the owner of the file and the process " "does not have appropriate privileges." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:134 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:137 msgid "The named file resides on a read-only file system." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:141 msgid "The I() function shall fail if:" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:148 msgid "" "I was not opened with O_SEARCH and the permissions of the directory " "underlying I do not permit directory searches." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:148 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:156 msgid "" "The I argument does not specify an absolute path and the I " "argument is neither AT_FDCWD nor a valid file descriptor open for reading or " "searching." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:163 msgid "" "The I argument is not an absolute path and I is a file descriptor " "associated with a non-directory file." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:165 msgid "These functions may fail if:" msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:165 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:168 msgid "A signal was caught during execution of the function." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:168 man-pages-posix/man3p/chmod.3p:192 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:173 msgid "The value of the I argument is invalid." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:180 msgid "" "More than {SYMLOOP_MAX} symbolic links were encountered during resolution of " "the I argument." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:188 msgid "" "The length of a pathname exceeds {PATH_MAX}, or pathname resolution of a " "symbolic link produced an intermediate result with a length that exceeds " "{PATH_MAX}." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:192 msgid "The I() function may fail if:" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:197 msgid "The value of the I argument is invalid." msgstr "" #. type: TP #: man-pages-posix/man3p/chmod.3p:197 #, no-wrap msgid "B" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:205 msgid "" "The AT_SYMLINK_NOFOLLOW bit is set in the I argument, I names a " "symbolic link, and the system does not support changing the mode of a " "symbolic link." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:207 msgid "I" msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:207 #, no-wrap msgid "EXAMPLES" msgstr "" #. type: SS #: man-pages-posix/man3p/chmod.3p:208 #, no-wrap msgid "Setting Read Permissions for User, Group, and Others" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:212 msgid "" "The following example sets read permissions for the owner, group, and others." "" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:217 man-pages-posix/man3p/chmod.3p:233 man-pages-posix/man3p/chmod.3p:250 #, no-wrap msgid "B<\n" "#include Esys/stat.hE>\n" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:221 #, no-wrap msgid "const char *path;\n" "\\&...\n" "chmod(path, S_IRUSR|S_IRGRP|S_IROTH);\n" msgstr "" #. type: SS #: man-pages-posix/man3p/chmod.3p:224 #, no-wrap msgid "Setting Read, Write, and Execute Permissions for the Owner Only" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:228 msgid "" "The following example sets read, write, and execute permissions for the " "owner, and no permissions for group and others." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:237 #, no-wrap msgid "const char *path;\n" "\\&...\n" "chmod(path, S_IRWXU);\n" msgstr "" #. type: SS #: man-pages-posix/man3p/chmod.3p:240 #, no-wrap msgid "Setting Different Permissions for Owner, Group, and Other" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:245 msgid "" "The following example sets owner permissions for CHANGEFILE to read, write, " "and execute, group permissions to read and execute, and other permissions to " "read." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:254 #, no-wrap msgid "" "#define CHANGEFILE \"/etc/myfile\"\n" "\\&...\n" "chmod(CHANGEFILE, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH);\n" msgstr "" #. type: SS #: man-pages-posix/man3p/chmod.3p:257 #, no-wrap msgid "Setting and Checking File Permissions" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:264 msgid "" "The following example sets the file permission bits for a file named B, then calls the I() function to verify the permissions." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:270 #, no-wrap msgid "B<\n" "#include Esys/types.hE\n" "#include Esys/stat.hE>\n" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:276 #, no-wrap msgid "" "int status;\n" "struct stat buffer\n" "\\&...\n" "chmod(\"home/cnd/mod1\", S_IRWXU|S_IRWXG|S_IROTH|S_IWOTH);\n" "status = stat(\"home/cnd/mod1\", &buffer;);\n" msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:279 #, no-wrap msgid "APPLICATION USAGE" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:286 msgid "" "In order to ensure that the S_ISUID and S_ISGID bits are set, an application " "requiring this should use I() after a successful I() to " "verify this." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:292 msgid "" "Any file descriptors currently open by any process on the file could " "possibly become invalid if the mode of the file is changed to a value which " "would deny access to that process. One situation where this could occur is " "on a stateless file system. This behavior will not occur in a conforming " "environment." msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:292 #, no-wrap msgid "RATIONALE" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:303 msgid "" "This volume of POSIX.1\\(hy2008 specifies that the S_ISGID bit is cleared by " "I() on a regular file under certain conditions. This is specified on " "the assumption that regular files may be executed, and the system should " "prevent users from making executable I() files perform with " "privileges that the caller does not have. On implementations that support " "execution of other file types, the S_ISGID bit should be cleared for those " "file types under the same circumstances." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:310 msgid "" "Implementations that use the S_ISUID bit to indicate some other function " "(for example, mandatory record locking) on non-executable files need not " "clear this bit on writing. They should clear the bit for executable files " "and any other cases where the bit grants special powers to processes that " "change the file contents. Similar comments apply to the S_ISGID bit." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:332 msgid "" "The purpose of the I() function is to enable changing the mode of " "files in directories other than the current working directory without " "exposure to race conditions. Any part of the path of a file could be " "changed in parallel to a call to I(), resulting in unspecified " "behavior. By opening a file descriptor for the target directory and using " "the I() function it can be guaranteed that the changed file is " "located relative to the desired directory. Some implementations might allow " "changing the mode of symbolic links. This is not supported by the interfaces " "in the POSIX specification. Systems with such support provide an interface " "named I(\\|). To support such implementations I() has a " "I parameter." msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:332 #, no-wrap msgid "FUTURE DIRECTIONS" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:334 msgid "None." msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:334 #, no-wrap msgid "SEE ALSO" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:344 msgid "" "I\\^(\\|), I\\^(\\|), I\\^, I\\^(\\|), " "I\\^(\\|), I\\^(\\|), I\\^(\\|), I\\^(\\|), " "I\\^(\\|)" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:349 msgid "" "The Base Definitions volume of POSIX.1\\(hy2008, Bfcntl.hE>, " "Bsys_stat.hE>, Bsys_types.hE>" msgstr "" #. type: SH #: man-pages-posix/man3p/chmod.3p:349 #, no-wrap msgid "COPYRIGHT" msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:360 msgid "" "Portions of this text are reprinted and reproduced in electronic form from " "IEEE Std 1003.1, 2013 Edition, Standard for Information Technology -- " "Portable Operating System Interface (POSIX), The Open Group Base " "Specifications Issue 7, Copyright (C) 2013 by the Institute of Electrical " "and Electronics Engineers, Inc and The Open Group. (This is POSIX.1-2008 " "with the 2013 Technical Corrigendum 1 applied.) In the event of any " "discrepancy between this version and the original IEEE and The Open Group " "Standard, the original IEEE and The Open Group Standard is the referee " "document. The original Standard can be obtained online at http://www.unix." "org/online.html ." msgstr "" #. type: Plain text #: man-pages-posix/man3p/chmod.3p:365 msgid "" "Any typographical or formatting errors that appear in this page are most " "likely to have been introduced during the conversion of the source files to " "man page format. To report such errors, see https://www.kernel.org/doc/man-" "pages/reporting_bugs.html ." msgstr ""