Python Forum
Set permnission with makedirs
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set permnission with makedirs
#8
(Jun-15-2023, 07:47 AM)SpongeB0B Wrote: Should not only display the umask but also set it !?
I just wanted to show the default value of the umask on my system. I chose the value 0 at random. Choose the value that you actually need for your file operation.

In the linux console, the current umask can also be displayed by invoking the umask command without argument

Output:
λ umask 0002
You could perhaps try
os.umask(os.umask(0) & ~(0o005))
to make sure that the umask does not prevent the "others" permission 5, or even
os.umask(os.umask(0) & ~(0o0755))
to make sure that the umask doesn't disallow the mode 0755
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