Page MenuHomePhabricator

Pywikibot sets non-executable file's mode to 700
Closed, ResolvedPublic

Description

Hi,

I figured out PWB automatically converts mode of user-password.py to 700 althrough 600 would be more appropriate,

See this example:

testovaci@notebook:~$ python ~/pywikibot/pwb.py login -family:species -lang:species
WARNING: /home/testovaci/pywikibot/pywikibot/tools/__init__.py:2015: UserWarning: File /home/testovaci/pywikibot/user-password.py had 600 mode; converted to 700 mode.
  warn(warn_str.format(filename, st_mode - stat.S_IFREG, mode))

Logging in to species:species as UrbanecmBot@BotTest
WARNING: /home/testovaci/pywikibot/pywikibot/tools/__init__.py:2015: UserWarning: File /home/testovaci/pywikibot/pywikibot.lwp had 664 mode; converted to 600 mode.
  warn(warn_str.format(filename, st_mode - stat.S_IFREG, mode))

Logged in on species:species as UrbanecmBot.

Martin

Event Timeline

Restricted Application added subscribers: pywikibot-bugs-list, Aklapper. · View Herald Transcript

Change 464943 had a related patch set uploaded (by Urbanecm; owner: Urbanecm):
[pywikibot/core@master] Change default file mode for private files to 600

https://gerrit.wikimedia.org/r/464943

Urbanecm moved this task from Backlog to Waiting on review on the User-Urbanecm board.

Change 464943 merged by jenkins-bot:
[pywikibot/core@master] Change default file mode for private files to 600

https://gerrit.wikimedia.org/r/464943

Reopended after the proposed revert of rPWBC049cd8a7,
Maybe the changed must be done on other places like tools or when saving those files.

Change 841875 had a related patch set uploaded (by Xqt; author: Xqt):

[pywikibot/core@master] [bugfix] Add a new variable 'private_folder_permission' to config.py

https://gerrit.wikimedia.org/r/841875

Change 841875 merged by jenkins-bot:

[pywikibot/core@master] [bugfix] Add a new variable 'private_folder_permission' to config.py

https://gerrit.wikimedia.org/r/841875