Что-то вы гоните насчет "привычного вида формата 755 и 644". Я вот вообще не понял что это!😳
Действительно, что означают цифры которые мы получили в прошлом посте?
Это кодировка, заключающая в себе режимы доступа к файлу.
Подробней можно почитать в статье про chmod.
Там можно увидеть альтернативное обозначение того же самого с помощью символов r w x, что значит чтение, запись, исполнение.
Чтобы преобразовать восьмеричное число в такое обозначение в Python есть готовая функция
>>> stat.filemode(0o755)
'?rwxr-xr-x'
Мы видим 3 группы по 3 символа, дающие 3 типа доступа для 3 типов юзеров.
А что за знак вопроса в начале?
Давайте передадим в эту функцию необрезанное значение от os.stat
>>> stat.filemode(os.stat(path).st_mode)
'drwxr-xr-x'
Это данные, которые мы безжалостно обрезали в прошлый раз😼
Первый символ обозначает тип объекта. Это может быть файл (-), директория (d) или симлинк (l).
Вот простая схема данной кодировки
[1][3][3][3]
│ │ │ │
│ │ │ └──> Others Permissions
│ │ └─────> Group Permissions
│ └────────> Owner Permissions
└───────────> File Type
(разверните экран если вы с телефона)
Если вы попробуете получить пермишены для симлинка то получите пермишены для файла
>>> path = '.venv/bin/python3'
>>> stat.filemode(os.stat(path).st_mode)
'-rwxr-xr-x'
Чтобы получить свойства именно симлинка, нужно это явно указать
>>> stat.filemode(os.stat(path, follow_symlinks=False).st_mode)
'lrwxrwxrwx'
#tricks#basic
#Christian neighborhoods in #Damascus protesting in the middle of the night after targeting the Christians in #Hama by the Islamist gangs calling themselves a government
@TheAlawiteEcho
The Syrian barbaric islamist gangs are now raiding and vandalizing the #Christian city of Skailbiyah in #Hama after they attacked every single non-Sunni sect and religion https://t.co/GX12QdO06L
View tweet
#Damascus : Ismaili Man Killed by Gunmen, Amid Rising Attacks Targeting the Ismaili Community
Madin Ismail Zino, 56, originally from the city of Salamiyah in W. #Hama countryside, has died from critical gunshot wounds he sustained a week ago in e. #Domar area of Damascus. He passed away today April 10, 2026.
Since the start of this year, there has been a significant rise in attacks targeting members of the Ismaili community, including killings and kidnappings, a stark escalation compared to 2025, when incidents against them were largely confined to theft and property damage.
Incidents Targeting the Ismaili Community in 2026:
Haider Haider from Salamiyah killed in Homs on February 18, 2026,
https://x.com/syjusticearc/status/2024161104721859030
Maad Nasser, 66 years old, killed in front of his house in Salamiyah on February 10, 2026
https://x.com/syjusticearc/status/2021267785347641793
Ismail Mustafa Safar from Salamiyah countryside was found dead in
Homs countryside, March 14, 2026
https://x.com/syjusticearc/status/2032824907457761443
Ali Mustafa Al-Eizouqi, killed near Salamiyah on January 22, 2026
https://x.com/syjusticearc/status/2014970181064233072
Joseph Milad Zeino, young man in his twenties, kidnapped from a local store in Domar near Damascus on March 12, 2026.
Kidnappers are demanding a huge ransom
https://x.com/syjusticearc/status/2033538625447587862
Protest in Salamiyah denouncing killings,, and the lack of security in the city, on February 13, 2026
https://x.com/syjusticearc/status/2022310059288547639
#WesternSyria | W. #Hama: Two Alawite men killed while working on their land by Al-Jolani’s terrorist militias
“Muhammad Hafez Al-Ali” and “Yusuf Muhammad Al-Ali” were killed yesterday, April 2, 2026, by an armed terrorist group affiliated with Al-Jolani’s militias, while working on their land located north of the village of #alBayad, in the municipality of Umm Al-Tuyur, in the W. #Hama countryside.
Happening now, an arrest campaign in #Misyaf and Western #Hama countryside by #Jolani forces.
Tens of #Alawite young men have been arrested arbitrarily, following the wide peaceful Alawite protests.
View tweet
Systematic Attacks on Religious Minorities' Shrines and Places of Worship in Syria
W #Hama: An extremist terrorist group has destroyed a religious shrine belonging to the #Alawite community, known as “Sheikh Muhammad al-Maghribi,” located in the village of #Asila in Masyaf, in the Ghab Plain in the rural countryside of Hama Governorate, yesterday 21 March 2026.
#Alawite: It is worth noting that attacks on Alawite religious shrines began following the fall of the regime, reaching their peak during the #massacres carried out against Alawites on the Syrian coast by al-Jolani’s forces. Incidents of assault on Alawite shrines have continued repeatedly, to the point where barely a month passes without an incident involving the bombing, desecration, or burning of shrines across various Alawite regions.
#Druze: Similarly, shrines belonging to the Druze community were subjected to comparable attacks, including vandalism, arson, and bombings, during the massacres of July 2025 in #Suwayda, carried out by the forces of al-Jolani’s terrorist regime.
#Christians: A church in #Damascus was also bombed in June 2025, in addition to attacks on churches in #Homs and the rural Homs region in the #alQusayr area. The massacres that took place in As-#Suwayda likewise saw the burning and destruction of three churches.