diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2023-12-14 13:41:54 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2023-12-14 13:41:54 -0300 |
commit | 54c1158aff8b987dea88b35597047fafe92cd0a7 (patch) | |
tree | b9e40abd6bc670033de0210e56af1eceda68af43 /share/hydractl | |
parent | 2368822db564cd0b71276f9af4741a7ad06fc55c (diff) | |
download | hydra-54c1158aff8b987dea88b35597047fafe92cd0a7.tar.gz hydra-54c1158aff8b987dea88b35597047fafe92cd0a7.tar.bz2 |
Fix: chown invocations
Diffstat (limited to 'share/hydractl')
-rwxr-xr-x | share/hydractl/backup-restore-bitcoind | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-firma | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-git | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-hidden | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-mail | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-mlmmj | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-munin | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-schleuder | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-site | 20 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-svn | 4 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-sympa | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-tahoe | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-restore-yacy | 2 | ||||
-rwxr-xr-x | share/hydractl/backup-site | 6 | ||||
-rwxr-xr-x | share/hydractl/sync-guestfs | 2 | ||||
-rwxr-xr-x | share/hydractl/sync-media | 8 | ||||
-rwxr-xr-x | share/hydractl/sync-tpc | 2 |
17 files changed, 32 insertions, 32 deletions
diff --git a/share/hydractl/backup-restore-bitcoind b/share/hydractl/backup-restore-bitcoind index 359492d..9789968 100755 --- a/share/hydractl/backup-restore-bitcoind +++ b/share/hydractl/backup-restore-bitcoind @@ -39,4 +39,4 @@ hydra_backup_environment_service #cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR # # Fix permissions. -#chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +#chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-firma b/share/hydractl/backup-restore-firma index 35b2edb..c5042a1 100755 --- a/share/hydractl/backup-restore-firma +++ b/share/hydractl/backup-restore-firma @@ -35,4 +35,4 @@ hydra_backup_environment_service rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/ # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-git b/share/hydractl/backup-restore-git index 53f6465..a51810a 100755 --- a/share/hydractl/backup-restore-git +++ b/share/hydractl/backup-restore-git @@ -41,7 +41,7 @@ rm -rf $SERVICE_DIR cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR # Kick config. su $SERVICE_USER -c "gl-setup" diff --git a/share/hydractl/backup-restore-hidden b/share/hydractl/backup-restore-hidden index d439b29..36fe4f6 100755 --- a/share/hydractl/backup-restore-hidden +++ b/share/hydractl/backup-restore-hidden @@ -53,5 +53,5 @@ for folder in `ls $RESTOREDIR/$SERVICE_DIR`; do done # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-mail b/share/hydractl/backup-restore-mail index 6179ad9..e09077d 100755 --- a/share/hydractl/backup-restore-mail +++ b/share/hydractl/backup-restore-mail @@ -50,4 +50,4 @@ mkdir -p $DATABASE_DIR rsync -av $RESTOREDIR/$DATABASE_DIR/ $DATABASE_DIR/ # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-mlmmj b/share/hydractl/backup-restore-mlmmj index fcf1b03..7212f67 100755 --- a/share/hydractl/backup-restore-mlmmj +++ b/share/hydractl/backup-restore-mlmmj @@ -35,4 +35,4 @@ hydra_backup_environment_service rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/ # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-munin b/share/hydractl/backup-restore-munin index 3e5fb30..7b3848c 100755 --- a/share/hydractl/backup-restore-munin +++ b/share/hydractl/backup-restore-munin @@ -42,4 +42,4 @@ rm -rf $SERVICE_DIR cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-schleuder b/share/hydractl/backup-restore-schleuder index b0a4541..72ec658 100755 --- a/share/hydractl/backup-restore-schleuder +++ b/share/hydractl/backup-restore-schleuder @@ -37,4 +37,4 @@ rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/ rsync -av --delete $RESTOREDIR/$CONF_DIR/ $CONF_DIR/ # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-site b/share/hydractl/backup-restore-site index bf48994..f1def1d 100755 --- a/share/hydractl/backup-restore-site +++ b/share/hydractl/backup-restore-site @@ -104,32 +104,32 @@ if [ "$1" == "localhost" ] || [ "$1" == "backups" ]; then fi # Fix permissions -chown -R root.root $FOLDER +chown -R root:root $FOLDER # Trac if [ -e "$FOLDER/trac" ]; then # Optionally also: gvcache/ log/ - ( cd $FOLDER/trac && chown -R $TRAC_USER.$TRAC_GROUP attachments conf db auth plugins .egg-cache ) + ( cd $FOLDER/trac && chown -R $TRAC_USER:$TRAC_GROUP attachments conf db auth plugins .egg-cache ) fi # PmWiki if [ -e "$FOLDER/wiki" ]; then - ( cd $FOLDER/wiki && chown -R $SITE_USER.$SITE_GROUP wiki.d uploads ) - chown $SITE.root $FOLDER/wiki/local/config.php + ( cd $FOLDER/wiki && chown -R $SITE_USER:$SITE_GROUP wiki.d uploads ) + chown $SITE:root $FOLDER/wiki/local/config.php chmod 660 $FOLDER/wiki/local/config.php fi # Site if [ -e "$FOLDER/site" ]; then - chown -R $SITE_USER.$SITE_GROUP $FOLDER/site + chown -R $SITE_USER:$SITE_GROUP $FOLDER/site fi # Drupal if [ -e "$FOLDER/drupal" ]; then SERIES="$4" - chown -R $SITE_USER.$SITE_GROUP $FOLDER/drupal/files - chown root.$SITE_GROUP $FOLDER/drupal/settings.php + chown -R $SITE_USER:$SITE_GROUP $FOLDER/drupal/files + chown root:$SITE_GROUP $FOLDER/drupal/settings.php chmod 640 $FOLDER/drupal/settings.php if [ -e "/etc/apache2/sites-available/$SITE" ]; then @@ -169,7 +169,7 @@ if [ -e "$FOLDER/ikiwiki" ]; then site="`basename $file .setup`" git clone file:///var/git/repositories/$SITE /var/sites/$SITE/ikiwiki_src ikiwiki --setup $file --rebuild - chown -R $SITE_USER.$SITE_GROUP /var/sites/$SITE/ikiwiki* + chown -R $SITE_USER:$SITE_GROUP /var/sites/$SITE/ikiwiki* else echo "Either $file or git repository not found for $SITE ikiwiki instance" fi @@ -178,6 +178,6 @@ fi # Moin if [ -e "$FOLDER/moin" ]; then echo "Restoring moin for $SITE..." - chown -R root.root $FOLDER/moin/ - chown -R $SITE_USER.$SITE_GROUP $FOLDER/moin/{cgi-bin,data,underlay} + chown -R root:root $FOLDER/moin/ + chown -R $SITE_USER:$SITE_GROUP $FOLDER/moin/{cgi-bin,data,underlay} fi diff --git a/share/hydractl/backup-restore-svn b/share/hydractl/backup-restore-svn index baf13b8..0829e69 100755 --- a/share/hydractl/backup-restore-svn +++ b/share/hydractl/backup-restore-svn @@ -39,5 +39,5 @@ hydractl backup-site svn rm -rf /var/svn && cp -a $RESTOREDIR/var/svn /var/svn # Fix permissions. -chown root.root /var/svn -chown -R $SERVICE_USER.$SERVICE_GROUP /var/svn/* +chown root:root /var/svn +chown -R $SERVICE_USER:$SERVICE_GROUP /var/svn/* diff --git a/share/hydractl/backup-restore-sympa b/share/hydractl/backup-restore-sympa index 917fdce..63ea82c 100755 --- a/share/hydractl/backup-restore-sympa +++ b/share/hydractl/backup-restore-sympa @@ -41,4 +41,4 @@ rsync -av --delete $RESTOREDIR/$SERVICE_DIR/ $SERVICE_DIR/ hydra_backup_restore_database sympa # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-tahoe b/share/hydractl/backup-restore-tahoe index e8b78ac..a3918d4 100755 --- a/share/hydractl/backup-restore-tahoe +++ b/share/hydractl/backup-restore-tahoe @@ -39,4 +39,4 @@ hydra_backup_environment_service #cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR # # Fix permissions. -#chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +#chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-restore-yacy b/share/hydractl/backup-restore-yacy index 7161756..8141771 100755 --- a/share/hydractl/backup-restore-yacy +++ b/share/hydractl/backup-restore-yacy @@ -38,4 +38,4 @@ hydra_backup_environment_service cp -a $RESTOREDIR/$SERVICE_DIR $SERVICE_DIR # Fix permissions. -chown -R $SERVICE_USER.$SERVICE_GROUP $SERVICE_DIR +chown -R $SERVICE_USER:$SERVICE_GROUP $SERVICE_DIR diff --git a/share/hydractl/backup-site b/share/hydractl/backup-site index e37a611..ce4a200 100755 --- a/share/hydractl/backup-site +++ b/share/hydractl/backup-site @@ -88,7 +88,7 @@ cd $DEST if [ ! -e "$DEST_BASE_SITE/.htpasswd" ]; then touch $DEST_BASE_SITE/.htpasswd chmod 640 $DEST_BASE_SITE/.htpasswd - chown root.$BACKUPS_GROUP $DEST_BASE_SITE/.htpasswd + chown root:$BACKUPS_GROUP $DEST_BASE_SITE/.htpasswd fi # Access setup @@ -110,7 +110,7 @@ if [ -d "$LOCATION" ]; then tar jcvf $PACK $LOCATION md5sum $PACK > $PACK.md5 sha1sum $PACK > $PACK.sha1 - chown root.$BACKUPS_GROUP $PACK* + chown root:$BACKUPS_GROUP $PACK* chmod 640 $PACK* echo "Saved $DEST/$PACK" fi @@ -127,7 +127,7 @@ if [ -d "/var/lib/mysql/$DATABASE" ]; then rm -f $DATABASE.sql md5sum $DATABASE.sql.bz2 > $DATABASE.sql.bz2.md5 sha1sum $DATABASE.sql.bz2 > $DATABASE.sql.bz2.sha1 - chown root.$BACKUPS_GROUP $DATABASE.sql* + chown root:$BACKUPS_GROUP $DATABASE.sql* chmod 640 $DATABASE.sql* echo "Saved $DEST/$DATABASE.sql.bz2" fi diff --git a/share/hydractl/sync-guestfs b/share/hydractl/sync-guestfs index dce2f2b..c2852e1 100755 --- a/share/hydractl/sync-guestfs +++ b/share/hydractl/sync-guestfs @@ -40,7 +40,7 @@ if [ ! -d "$DEST" ]; then GROUP="$(stat -c %G $ORIG)" # With the right permissions - $SUDO chown $OWNER.$GROUP $DEST + $SUDO chown $OWNER:$GROUP $DEST fi # First sync the folder structure diff --git a/share/hydractl/sync-media b/share/hydractl/sync-media index f3cd973..bf95678 100755 --- a/share/hydractl/sync-media +++ b/share/hydractl/sync-media @@ -75,7 +75,7 @@ function sync_media_add_metadata { function sync_media_playlist_perms { if [ -d "playlists" ]; then $sudo chmod 775 playlists - $sudo chown -R mpd.audio playlists + $sudo chown -R mpd:audio playlists find playlists -type f -exec sudo chmod 664 {} \; find playlists -type d -exec sudo chmod 775 {} \; fi @@ -87,7 +87,7 @@ function sync_media_incoming_perms { echo "Fixing $INCOMING permissions..." $sudo find $INCOMING -type f -exec chmod 664 {} \; $sudo find $INCOMING -type d -exec chmod 775 {} \; - $sudo chown -R $WHOAMI.incoming $INCOMING + $sudo chown -R $WHOAMI:incoming $INCOMING fi } @@ -187,8 +187,8 @@ mkdir -p $CACHE #echo "Fixing $CACHE permissions..." #$sudo find $CACHE -type f -exec chmod 644 {} \; #$sudo find $CACHE -type d -exec chmod 755 {} \; -$sudo chown $WHOAMI. $CACHE -$sudo chown $WHOAMI. $CACHE/* +$sudo chown $WHOAMI: $CACHE +$sudo chown $WHOAMI: $CACHE/* # Check if a specific repository was passed via the command line if [ ! -z "$REPOSITORY" ] && [ -d "$CACHE/$REPOSITORY" ] && ! echo "$REPOSITORY" | grep -q -- '--'; then diff --git a/share/hydractl/sync-tpc b/share/hydractl/sync-tpc index 0c8b177..c739c5a 100755 --- a/share/hydractl/sync-tpc +++ b/share/hydractl/sync-tpc @@ -69,7 +69,7 @@ if [ ! -d "$MEDIA" ]; then GROUP="$(stat -c %G /var/cache/`hostname -s`/media)" # With the right permissions - $SUDO chown $OWNER.$GROUP $MEDIA + $SUDO chown $OWNER:$GROUP $MEDIA fi # Guest images were previously synced using rsync |