Details

[Home]

Issue of the Implementation # S0578

Brief

fchmodat(..., AT_SYMLINK_NOFOLLOW) returns ENOTSUP on non-symlinks

Detailed Description

POSIX susv4: The fchmodat()function may fail if ... [EOPNOTSUPP] The AT_SYMLINK_NOFOLLOW bit is set in the flag argument, path names a symbolic link, and the system does not support changing the mode of a symbolic link. But fchmodat return EOPNOTSUPP even if path name s non-symbolic link

Example

int main()
{
    mkdir("/tmp/test1", S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
    int r = fchmodat(AT_FDCWD, "/tmp/test1", S_IRWXU|S_IRWXG|S_IROTH|S_IWOTH, AT_SYMLINK_NOFOLLOW);
    printf("res = %d  errno = %d", r, errno);
    if (errno == EOPNOTSUPP)
        printf("EOPNOTSUPP");

    return 0;
}

Component

glibc

Accepted

Sourceware Bugzilla 14578

[Home]