[App_rpt-users] archivedir permissions

Tom Hayward tom at tomh.us
Thu Jul 21 15:02:38 EDT 2016

On Thu, Jul 21, 2016 at 11:52 AM, Loren Tedford <lorentedford at gmail.com> wrote:
> The next step is crontab -e
> Add these two lines below..
> */01 * * * *  chown -R www-data:www-data /var/www/audio/
> */01 * * * *  chmod -R 775 /var/www/audio/

Ah, so here's the meat of it. I took a similar approach, but it still
seems hackish:

inotifywait -m -r /var/www/html/recordings -e create |
    while read path action file; do
        echo "The file '$file' appeared in directory '$path' via '$action'"
        chmod a+r "$path$file"

This at least has the benefit of not waiting until the next minute to
do the chmod and only chmod'ing the new file (rather than all
recursively). I'd love a method that doesn't require a chmod after the


More information about the App_rpt-users mailing list