Python Forum
Set permnission with makedirs
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set permnission with makedirs
#1
Hi everyone,

I would like to set the permission when using
from os import makedirs
I would like to have (for a directory) d-rwx-r-r (in other for "others") to be able to read the files inside that folder.

When I do a stat on a folder that have the permission that I want I get
Output:
(0755/drwxr-xr-x)
When I transpose this in python -->
makedirs('/somewhere', mode=0o0755)
The created folder give me another permission than expected..
Output:
(0750/drwxr-x---)
Any ideas ?
[Image: NfRQr9R.jpg]
Reply


Messages In This Thread
Set permnission with makedirs - by SpongeB0B - Jun-06-2023, 11:19 AM
RE: Set permnission with makedirs - by Gribouillis - Jun-06-2023, 12:37 PM
RE: Set permnission with makedirs - by SpongeB0B - Jun-06-2023, 01:12 PM
RE: Set permnission with makedirs - by SpongeB0B - Jun-06-2023, 01:15 PM
RE: Set permnission with makedirs - by SpongeB0B - Jun-06-2023, 01:27 PM
RE: Set permnission with makedirs - by Gribouillis - Jun-06-2023, 05:10 PM
RE: Set permnission with makedirs - by SpongeB0B - Jun-15-2023, 07:47 AM
RE: Set permnission with makedirs - by Gribouillis - Jun-15-2023, 09:41 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020