Skip to content

Instantly share code, notes, and snippets.

@torarnv
Created January 21, 2019 15:09
Show Gist options
  • Save torarnv/e3ca93b4f043c88bbd07c8172f17224e to your computer and use it in GitHub Desktop.
Save torarnv/e3ca93b4f043c88bbd07c8172f17224e to your computer and use it in GitHub Desktop.
Disabling Windows ACL for a Synology share
#!/bin/bash
# Run in share directory, e.g. /volume1/foo
echo "Removing share '$1' without removing files..."
sudo synoshare --del FALSE $1
echo "Changing ownership of files..."
sudo chown -R $USER:users . *
echo "Changing file permissions..."
find . -type f -exec chmod 640 {} \;
find . -type d -exec chmod 750 {} \;
echo "Regenerating share info"
sudo synocheckshare
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment