mirror of
https://github.com/standardebooks/web.git
synced 2025-07-13 01:52:02 -04:00
chown/chmod files during deploy within their correct scripts, instead of in the parent deploy script
This commit is contained in:
parent
306a77ce96
commit
4baea8536d
3 changed files with 17 additions and 6 deletions
|
@ -411,9 +411,6 @@ if [ "${feeds}" = "true" ]; then
|
||||||
|
|
||||||
"${scriptsDir}/generate-feeds" --webroot "${webRoot}" --weburl "${webUrl}"
|
"${scriptsDir}/generate-feeds" --webroot "${webRoot}" --weburl "${webUrl}"
|
||||||
|
|
||||||
sudo chown --recursive se:committers "${webRoot}"/feeds/*/{*.xml,*/*.xml}
|
|
||||||
sudo chmod --recursive a+r,ug+w,a+X "${webRoot}"/feeds/*/
|
|
||||||
|
|
||||||
if [ "${verbose}" = "true" ]; then
|
if [ "${verbose}" = "true" ]; then
|
||||||
printf "Done.\n"
|
printf "Done.\n"
|
||||||
fi
|
fi
|
||||||
|
@ -433,9 +430,6 @@ if [ "${bulkDownloads}" = "true" ]; then
|
||||||
|
|
||||||
"${scriptsDir}/generate-bulk-downloads" --webroot "${webRoot}"
|
"${scriptsDir}/generate-bulk-downloads" --webroot "${webRoot}"
|
||||||
|
|
||||||
sudo chown --recursive se:committers "${webRoot}"/bulk-downloads/*/
|
|
||||||
sudo chmod --recursive a+r,ug+w,a+X "${webRoot}"/bulk-downloads/*/
|
|
||||||
|
|
||||||
if [ "${verbose}" = "true" ]; then
|
if [ "${verbose}" = "true" ]; then
|
||||||
printf "Done.\n"
|
printf "Done.\n"
|
||||||
fi
|
fi
|
||||||
|
@ -445,3 +439,7 @@ if [ "${bulkDownloads}" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${verbose}" = "true" ]; then
|
||||||
|
printf "Finished processing ebook.\n"
|
||||||
|
fi
|
||||||
|
|
|
@ -211,3 +211,9 @@ foreach($groups as $group){
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set ownership and permissions
|
||||||
|
// We don't use PHP's built in chown/chmod chmod can't accept strings
|
||||||
|
// The `chmod +X` command, with a capital X, makes only matched directories executable.
|
||||||
|
exec('sudo chown --preserve-root --recursive se:committers ' . escapeshellarg($webRoot) . '/bulk-downloads/*/');
|
||||||
|
exec('sudo chmod --preserve-root --recursive a+r,ug+w,a+X ' . escapeshellarg($webRoot) . '/bulk-downloads/*/');
|
||||||
|
|
|
@ -233,3 +233,10 @@ foreach($ebooksByAuthor as $collection => $ebooks){
|
||||||
$collectionAtomFeed = new AtomFeed($title, $subtitle, '/feeds/atom/authors/' . $authors[$collection]['id'], $webRoot . '/feeds/atom/authors/' . $authors[$collection]['id'] . '.xml', $ebooks);
|
$collectionAtomFeed = new AtomFeed($title, $subtitle, '/feeds/atom/authors/' . $authors[$collection]['id'], $webRoot . '/feeds/atom/authors/' . $authors[$collection]['id'] . '.xml', $ebooks);
|
||||||
SaveFeed($collectionAtomFeed, $force, $authors[$collection]['name'], $authors[$collection]['sortedname'], $now);
|
SaveFeed($collectionAtomFeed, $force, $authors[$collection]['name'], $authors[$collection]['sortedname'], $now);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set ownership and permissions
|
||||||
|
// We don't use PHP's built in chown/chmod chmod can't accept strings
|
||||||
|
// The `chmod +X` command, with a capital X, makes only matched directories executable.
|
||||||
|
exec('sudo chown --preserve-root --recursive se:committers ' . escapeshellarg($webRoot) . '/feeds/*/*.xml');
|
||||||
|
exec('sudo chown --preserve-root --recursive se:committers ' . escapeshellarg($webRoot) . '/feeds/*/*/*.xml');
|
||||||
|
exec('sudo chmod --preserve-root --recursive a+r,ug+w,a+X ' . escapeshellarg($webRoot) . '/feeds/*/');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue