* Wrong NTFS permissions
@ 2024-01-23 21:54 Vincent Rivière
2024-01-24 3:14 ` Marco Atzeri
0 siblings, 1 reply; 4+ messages in thread
From: Vincent Rivière @ 2024-01-23 21:54 UTC (permalink / raw)
To: cygwin
Hi,
I'm facing a really weird issue with NTFS permissions.
$ umask
0022
$ cd /cygdrive/h/
$ mkdir a
$ ls -ld a
drwxr-xr-x 1 vincent vincent 0 Jan 23 22:35 a
# You can see that permissions are fine.
$ getfacl a
# file: a
# owner: vincent
# group: vincent
user::rwx
group::r-x
other::r-x
default:user::rwx
default:group::r-x
default:other::rwx
# I have no idea if those default: values are good.
$ cd a
$ mkdir b
$ ls -ld b
drwxr-xrwx+ 1 vincent vincent 0 Jan 23 22:44 b
# Bogus permissions!
$ getfacl b
# file: b
# owner: vincent
# group: vincent
getfacl: b: Invalid argument
Am I missing something, or this is a Cygwin bug?
Cheers,
--
Vincent Rivière
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wrong NTFS permissions
2024-01-23 21:54 Wrong NTFS permissions Vincent Rivière
@ 2024-01-24 3:14 ` Marco Atzeri
2024-01-24 8:35 ` Vincent Rivière
0 siblings, 1 reply; 4+ messages in thread
From: Marco Atzeri @ 2024-01-24 3:14 UTC (permalink / raw)
To: cygwin
On 23/01/2024 22:54, Vincent Rivière via Cygwin wrote:
> Hi,
>
> I'm facing a really weird issue with NTFS permissions.
>
> $ umask
> 0022
>
> $ cd /cygdrive/h/
what is H ?
> $ mkdir a
>
> $ ls -ld a
> drwxr-xr-x 1 vincent vincent 0 Jan 23 22:35 a
>
> # You can see that permissions are fine.
>
> $ getfacl a
> # file: a
> # owner: vincent
> # group: vincent
> user::rwx
> group::r-x
> other::r-x
> default:user::rwx
> default:group::r-x
> default:other::rwx
>
> # I have no idea if those default: values are good.
>
> $ cd a
> $ mkdir b
>
> $ ls -ld b
> drwxr-xrwx+ 1 vincent vincent 0 Jan 23 22:44 b
>
> # Bogus permissions!
>
> $ getfacl b
> # file: b
> # owner: vincent
> # group: vincent
> getfacl: b: Invalid argument
>
> Am I missing something, or this is a Cygwin bug?
>
> Cheers,
my guess,
it is related to the remote server as I see as expected
$ cd /cygdrive/z
$ mkdir a
$ getfacl a
# file: a
# owner: Unknown+User
# group: Unix_Group+0
user::rwx
group::rwx
other::rwx
$ cd a
$ mkdir b
$ getfacl b
# file: b
# owner: Unknown+User
# group: Unix_Group+0
user::rwx
group::rwx
other::rwx
Use csih package for more info on your remote package
$ /usr/lib/csih/getVolInfo .
Device Type : 0x07
Characteristics : 0x00000010
FILE_REMOVABLE_MEDIA : FALSE
FILE_REMOTE_DEVICE : TRUE
Volume Name : <marco-backup>
Serial Number : 2870488680
Max Filenamelength : 255
Filesystemname : <NTFS>
Flags : 0x0001002f
FILE_CASE_SENSITIVE_SEARCH : TRUE
FILE_CASE_PRESERVED_NAMES : TRUE
FILE_UNICODE_ON_DISK : TRUE
FILE_PERSISTENT_ACLS : TRUE
FILE_FILE_COMPRESSION : FALSE
FILE_VOLUME_QUOTAS : TRUE
FILE_SUPPORTS_SPARSE_FILES : FALSE
FILE_SUPPORTS_REPARSE_POINTS : FALSE
FILE_SUPPORTS_REMOTE_STORAGE : FALSE
FILE_RETURNS_CLEANUP_RESULT_INFO : FALSE
FILE_SUPPORTS_POSIX_UNLINK_RENAME : FALSE
FILE_VOLUME_IS_COMPRESSED : FALSE
FILE_SUPPORTS_OBJECT_IDS : TRUE
FILE_SUPPORTS_ENCRYPTION : FALSE
FILE_NAMED_STREAMS : FALSE
FILE_READ_ONLY_VOLUME : FALSE
FILE_SEQUENTIAL_WRITE_ONCE : FALSE
FILE_SUPPORTS_TRANSACTIONS : FALSE
FILE_SUPPORTS_HARD_LINKS : FALSE
FILE_SUPPORTS_EXTENDED_ATTRIBUTES : FALSE
FILE_SUPPORTS_OPEN_BY_FILE_ID : FALSE
FILE_SUPPORTS_USN_JOURNAL : FALSE
FILE_SUPPORTS_INTEGRITY_STREAMS : FALSE
FILE_SUPPORTS_BLOCK_REFCOUNTING : FALSE
FILE_SUPPORTS_SPARSE_VDL : FALSE
FILE_DAX_VOLUME : FALSE
FILE_SUPPORTS_GHOSTING : FALSE
Regards
Marco
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wrong NTFS permissions
2024-01-24 3:14 ` Marco Atzeri
@ 2024-01-24 8:35 ` Vincent Rivière
2024-01-24 14:32 ` Andrey Repin
0 siblings, 1 reply; 4+ messages in thread
From: Vincent Rivière @ 2024-01-24 8:35 UTC (permalink / raw)
To: cygwin
On 24/01/2024 at 04:14, Marco Atzeri via Cygwin wrote:
>> $ cd /cygdrive/h/
>
> what is H ?
It is H:, a local NTFS partition.
> Use csih package for more info on your remote package
$ /usr/lib/csih/getVolInfo /cygdrive/h
Device Type : 0x07
Characteristics : 0x00020020
FILE_REMOVABLE_MEDIA : FALSE
FILE_REMOTE_DEVICE : FALSE
Volume Name : <***>
Serial Number : ***
Max Filenamelength : 255
Filesystemname : <NTFS>
Flags : 0x03e706ff
FILE_CASE_SENSITIVE_SEARCH : TRUE
FILE_CASE_PRESERVED_NAMES : TRUE
FILE_UNICODE_ON_DISK : TRUE
FILE_PERSISTENT_ACLS : TRUE
FILE_FILE_COMPRESSION : TRUE
FILE_VOLUME_QUOTAS : TRUE
FILE_SUPPORTS_SPARSE_FILES : TRUE
FILE_SUPPORTS_REPARSE_POINTS : TRUE
FILE_SUPPORTS_REMOTE_STORAGE : FALSE
FILE_RETURNS_CLEANUP_RESULT_INFO : TRUE
FILE_SUPPORTS_POSIX_UNLINK_RENAME : TRUE
FILE_VOLUME_IS_COMPRESSED : FALSE
FILE_SUPPORTS_OBJECT_IDS : TRUE
FILE_SUPPORTS_ENCRYPTION : TRUE
FILE_NAMED_STREAMS : TRUE
FILE_READ_ONLY_VOLUME : FALSE
FILE_SEQUENTIAL_WRITE_ONCE : FALSE
FILE_SUPPORTS_TRANSACTIONS : TRUE
FILE_SUPPORTS_HARD_LINKS : TRUE
FILE_SUPPORTS_EXTENDED_ATTRIBUTES : TRUE
FILE_SUPPORTS_OPEN_BY_FILE_ID : TRUE
FILE_SUPPORTS_USN_JOURNAL : TRUE
FILE_SUPPORTS_INTEGRITY_STREAMS : FALSE
FILE_SUPPORTS_BLOCK_REFCOUNTING : FALSE
FILE_SUPPORTS_SPARSE_VDL : FALSE
FILE_DAX_VOLUME : FALSE
FILE_SUPPORTS_GHOSTING : FALSE
SectorInfoFlags : 0x03
SSINFO_FLAGS_NO_SEEK_PENALTY : FALSE
SSINFO_FLAGS_TRIM_ENABLED : FALSE
By the way, I found a solution:
setfacl -s u::rwx,g::r-x,o::r-x,d:u::rwx,d:g::r-x,d:o::r-x myfolder
After that, permissions work as expected inside "myfolder" and new
subfolders. Even on H:. But I'm not sure to understand why. I would have
expected that a simple chmod on myfolder would have be enough, instead of
the obscure setfacl.
Anyway, in my initial report, the "getfacl: b: Invalid argument" message
looks really abnormal.
Cheers,
--
Vincent Rivière
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Wrong NTFS permissions
2024-01-24 8:35 ` Vincent Rivière
@ 2024-01-24 14:32 ` Andrey Repin
0 siblings, 0 replies; 4+ messages in thread
From: Andrey Repin @ 2024-01-24 14:32 UTC (permalink / raw)
To: Vincent Rivière, cygwin
Greetings, Vincent Rivière!
> On 24/01/2024 at 04:14, Marco Atzeri via Cygwin wrote:
>>> $ cd /cygdrive/h/
>> > what is H ?
> It is H:, a local NTFS partition.
>> Use csih package for more info on your remote package
> $ /usr/lib/csih/getVolInfo /cygdrive/h
> Device Type : 0x07
> Characteristics : 0x00020020
> FILE_REMOVABLE_MEDIA : FALSE
> FILE_REMOTE_DEVICE : FALSE
> Volume Name : <***>
> Serial Number : ***
> Max Filenamelength : 255
> Filesystemname : <NTFS>
> Flags : 0x03e706ff
> FILE_CASE_SENSITIVE_SEARCH : TRUE
> FILE_CASE_PRESERVED_NAMES : TRUE
> FILE_UNICODE_ON_DISK : TRUE
> FILE_PERSISTENT_ACLS : TRUE
> FILE_FILE_COMPRESSION : TRUE
> FILE_VOLUME_QUOTAS : TRUE
> FILE_SUPPORTS_SPARSE_FILES : TRUE
> FILE_SUPPORTS_REPARSE_POINTS : TRUE
> FILE_SUPPORTS_REMOTE_STORAGE : FALSE
> FILE_RETURNS_CLEANUP_RESULT_INFO : TRUE
> FILE_SUPPORTS_POSIX_UNLINK_RENAME : TRUE
> FILE_VOLUME_IS_COMPRESSED : FALSE
> FILE_SUPPORTS_OBJECT_IDS : TRUE
> FILE_SUPPORTS_ENCRYPTION : TRUE
> FILE_NAMED_STREAMS : TRUE
> FILE_READ_ONLY_VOLUME : FALSE
> FILE_SEQUENTIAL_WRITE_ONCE : FALSE
> FILE_SUPPORTS_TRANSACTIONS : TRUE
> FILE_SUPPORTS_HARD_LINKS : TRUE
> FILE_SUPPORTS_EXTENDED_ATTRIBUTES : TRUE
> FILE_SUPPORTS_OPEN_BY_FILE_ID : TRUE
> FILE_SUPPORTS_USN_JOURNAL : TRUE
> FILE_SUPPORTS_INTEGRITY_STREAMS : FALSE
> FILE_SUPPORTS_BLOCK_REFCOUNTING : FALSE
> FILE_SUPPORTS_SPARSE_VDL : FALSE
> FILE_DAX_VOLUME : FALSE
> FILE_SUPPORTS_GHOSTING : FALSE
> SectorInfoFlags : 0x03
> SSINFO_FLAGS_NO_SEEK_PENALTY : FALSE
> SSINFO_FLAGS_TRIM_ENABLED : FALSE
> By the way, I found a solution:
> setfacl -s u::rwx,g::r-x,o::r-x,d:u::rwx,d:g::r-x,d:o::r-x myfolder
I suggest you don't do that. Better just leave permissions to the system.
> After that, permissions work as expected inside "myfolder" and new
> subfolders. Even on H:. But I'm not sure to understand why. I would have
> expected that a simple chmod on myfolder would have be enough, instead of
> the obscure setfacl.
setfacl is far from obscure. chmod was never a useful tool for complicated
permissions control.
But to the both of them you better not use either outside the Cygwin root
directory.
Change the cygdrive entry in your /etc/fstab to contain noacl option and your
life suddenly become easier.
>> none /cygdrive cygdrive noacl,binary,nouser,posix=0 0 0
> Anyway, in my initial report, the "getfacl: b: Invalid argument" message
> looks really abnormal.
It looks strange, that's right. May be icacls would shine some light.
But given this is not a Cygwin root, it's better to not enforce Cygwin
permissions on it.
--
With best regards,
Andrey Repin
Wednesday, January 24, 2024 17:25:40
Sorry for my terrible english...
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-01-24 14:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23 21:54 Wrong NTFS permissions Vincent Rivière
2024-01-24 3:14 ` Marco Atzeri
2024-01-24 8:35 ` Vincent Rivière
2024-01-24 14:32 ` Andrey Repin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).