Lowered file permissions to more reasonable levels, as per #83

This commit is contained in:
boltgolt 2018-11-09 20:26:19 +01:00
parent 33204eeb94
commit aaa4a8a311
No known key found for this signature in database
GPG key ID: BECEC9937E1AAE26
2 changed files with 6 additions and 4 deletions

View file

@ -13,7 +13,8 @@ script:
- 'sudo howdy | ack-grep --passthru --color "current active user: travis"'
- echo "import face_recognition; print(face_recognition.__version__);" > /tmp/h.py
- python3 /tmp/h.py
- sudo /usr/bin/env python3 /tmp/h.py
- sudo howdy test
# Remove howdy from the installation
- sudo apt purge howdy -y

7
debian/postinst vendored
View file

@ -53,6 +53,7 @@ if not os.path.exists("/tmp/howdy_picked_device"):
# Go through every setting in the old config and apply it to the new file
for section in oldConf.sections():
for (key, value) in oldConf.items(section):
# If config is still using the old device_id parameter, convert it to a path
if key == "device_id":
key = "device_path"
value = "/dev/video" + value
@ -124,12 +125,12 @@ for line in fileinput.input(["/lib/security/howdy/config.ini"], inplace = 1):
print("Camera ID saved")
# Secure the howdy folder
handleStatus(subprocess.call(["chmod 600 -R /lib/security/howdy/"], shell=True))
handleStatus(subprocess.call(["chmod 744 -R /lib/security/howdy/"], shell=True))
# Allow anyone to execute the python CLI
handleStatus(subprocess.call(["chmod 755 /lib/security/howdy"], shell=True))
handleStatus(subprocess.call(["chmod 744 /lib/security/howdy/cli.py"], shell=True))
handleStatus(subprocess.call(["chmod 744 -R /lib/security/howdy/cli"], shell=True))
handleStatus(subprocess.call(["chmod 755 /lib/security/howdy/cli.py"], shell=True))
handleStatus(subprocess.call(["chmod 755 -R /lib/security/howdy/cli"], shell=True))
print("Permissions set")
# Make the CLI executable as howdy