19 lines
691 B
Bash
Executable File
19 lines
691 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script will update the permissions of the /home/zaine/master-folder directory and all its contents to ensure that the nextcloud user has the necessary permissions to access and modify files within that directory.
|
|
|
|
# The two commands to run are:
|
|
# sudo chown -R zaine:www-data /home/zaine/master-folder
|
|
# sudo chmod -R 2775 /home/zaine/master-folder
|
|
|
|
# Update ownership to zaine:www-data
|
|
sudo chown -R zaine:www-data /home/zaine/master-folder
|
|
|
|
# Update permissions to 2775
|
|
sudo chmod -R 2775 /home/zaine/master-folder
|
|
|
|
echo "Permissions updated for /home/zaine/master-folder and its contents."
|
|
|
|
# cron job to run this script every hour
|
|
# 0 * * * * /path/to/this/script.sh
|