> That's not what I'm seeing when I run your test program on Linux:
>
> $ ./sun
> fstat mode = 140666
> stat mode = 140777
True, but it creates the socket file with exactly how umask(0) told it to,
and stat() shows that. So yeah, I should retract that it works on Linux with
fchmod() -- on Linux
Greetings, Lavrentiev, Anton (NIH/NLM/NCBI) [C]!
>> what your test program was actually doing. But you seem to be assuming that
>> calling fchmod on a socket descriptor should affect the permissions on the
>> socket file (assuming the socket is bound). Is that documented anywhere?
>> POSIX
>>
On 7/2/2022 3:37 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
what your test program was actually doing. But you seem to be assuming that
calling fchmod on a socket descriptor should affect the permissions on the
socket file (assuming the socket is bound). Is that documented anywhere? POSIX
> what your test program was actually doing. But you seem to be assuming that
> calling fchmod on a socket descriptor should affect the permissions on the
> socket file (assuming the socket is bound). Is that documented anywhere?
> POSIX
> says that the behavior of fchmod on a socket descriptor
On 7/2/2022 12:16 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
I forgot to mention that my "umask" is the standard 022...
The man page says that for directories with the ACLs, it is ignored.
So in my code bind() wouldn't have created the socket with 0777, and
that's fine! Which is why I cal
I forgot to mention that my "umask" is the standard 022...
The man page says that for directories with the ACLs, it is ignored.
So in my code bind() wouldn't have created the socket with 0777, and
that's fine! Which is why I call fchmod() to fix the permissions up,
and THAT does not work. BTW,
On 7/1/2022 11:23 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
That way I'm sure I won't have any surprises with permissions when working in
/cygdrive/g/cygwin. Do you want to try that and see if it makes a difference?
I have no problems with /cygdrive/g/cygwin -- my socket file gets create
> That way I'm sure I won't have any surprises with permissions when working in
> /cygdrive/g/cygwin. Do you want to try that and see if it makes a difference?
I have no problems with /cygdrive/g/cygwin -- my socket file gets created there
with proper
permissions and reported so, too (both fstat
On 7/1/2022 6:11 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
Cygwin does not do this on a standard installation. Is it something you've done
I did use the standard Setup and nothing else... My $HOME looks fine, too:
$ cd
$ pwd
/home/ANTON
$ getfacl .
# file: .
# owner: ANTON
# group: Non
> Cygwin does not do this on a standard installation. Is it something you've
> done
I did use the standard Setup and nothing else... My $HOME looks fine, too:
$ cd
$ pwd
/home/ANTON
$ getfacl .
# file: .
# owner: ANTON
# group: None
user::rwx
group::---
other::---
default:user::rwx
default:gro
On 7/1/2022 2:00 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
Lastly, I forgot to list all the involved directories as they look from under
Cygwin with their permissions,
if that's of any help:
$ ls -ld ~ ~/.socket ~/subdir ~/subdir/.socket
drwx--+ 1 ANTON None 0 Jul 1 13:36 /home/ANTON
On 7/1/2022 2:00 PM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] wrote:
getfacl does not work even for the .socket "file" in my home directory for
which ~/sun works perfectly fine with permissions
(and all subdirectories crated with mkdir under it).
Also like I said, ~/sun also works perfectly fine in
getfacl does not work even for the .socket "file" in my home directory for
which ~/sun works perfectly fine with permissions
(and all subdirectories crated with mkdir under it).
Also like I said, ~/sun also works perfectly fine in /cygdrive/g/cygwin/ but
not if I created a subdirectory with the
On 7/1/2022 1:46 AM, Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin wrote:
Now, if I run this code in my Cygwin home directory (and any directory that I create
using "mkdir..." under it),
I am getting the expected results:
$ ~/sun
fstat mode = 140666
stat mode = 140666
$ ls -l .socket
srw-rw-
14 matches
Mail list logo