[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-30 Thread Eryk Sun
Eryk Sun added the comment: > takes extended file attributes like immutable bit Just to clarify, immutable isn't an extended attribute. It's one of the flag values in a Linux inode, which is supported by some filesystems such as ext4. It's in the API as STATX_ATTR_IMMUTABLE from the statx()

[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-27 Thread Christian Heimes
Christian Heimes added the comment: > That's interesting. In Linux, for example, I would expect the access() > and faccessat() system calls to also check mandatory permissions. I > know from experience that at least the [i]mmutable file attribute is > checked. access(2) takes extended file a

[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-27 Thread Eryk Sun
Eryk Sun added the comment: > os.access() is not a good and sufficient permission check. It > only checks DAC (discrete access control) permissions That's interesting. In Linux, for example, I would expect the access() and faccessat() system calls to also check mandatory permissions. I know

[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-27 Thread Christian Heimes
Christian Heimes added the comment: A word of warning: os.access() is not a good and sufficient permission check. It only checks DAC (discrete access control) permissions and suffers from TOCTOU issues. Operating systems have additional permission checks and security policies, for example m

[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-27 Thread Piotr Kopalko
New submission from Piotr Kopalko : Path('example.toml').permissions() == Permissions(owner=(READ, WRITE, EXECUTE), group=(READ), other=(,)) -- ___ Python tracker ___

[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-27 Thread Maciej Olko
Change by Maciej Olko : -- nosy: +Maciej Olko ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue42481] Add to pathlib function to check permission similar to os.access

2020-11-27 Thread Piotr Kopalko
Change by Piotr Kopalko : -- nosy: copalco priority: normal severity: normal status: open title: Add to pathlib function to check permission similar to os.access type: enhancement ___ Python tracker _