fchmod on a socket?

Dave Wilson (lkml@botanicus.net)
Wed, 21 Aug 2002 19:00:44 +0100


Hi there,
I'm unsure as to whether this is a bug or not, but if I try to do an
fchmod() on an fd for a UNIX domain socket, it returns success (0), but
does not actually change the permission mode.

--- strace
socket(PF_UNIX, SOCK_DGRAM, 0) = 3
bind(3, {sin_family=AF_UNIX, path="/tmp/log.extended"}, 110) = 0
setsockopt(3, SOL_SOCKET, SO_PASSCRED, [1], 4) = 0
fcntl64(3, F_SETFL, O_RDONLY|O_ASYNC) = 0
fchmod(3, 0666) = 0

---

--- socket File: "/tmp/log.extended" Size: 0 Blocks: 0 Socket Device: 1601h/5633d Inode: 193160 Links: 1 Access: (0755/srwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ wheel)

---

Thanks, Dave. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/