Timeline for Wildcard expansion doesn't happen when Bash script invoked from cron under macOS
Current License: CC BY-SA 4.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Apr 21, 2022 at 3:43 | vote | accept | VirtualWolf | ||
| Apr 20, 2022 at 0:32 | comment | added | VirtualWolf | @Seamus Yeah that's a good call, I've updated the title. | |
| Apr 20, 2022 at 0:31 | history | edited | VirtualWolf | CC BY-SA 4.0 | Edited title to clarify that this is under macOS specifically. |
| Apr 19, 2022 at 9:07 | comment | added | Seamus | You used the macos tag - that's good! But you probably should mention macos in your Title line also. There are many "non-standard" things like this in macos. | |
| Apr 19, 2022 at 7:49 | history | edited | Kusalananda♦ | edited tags | |
| Apr 19, 2022 at 7:45 | comment | added | muru | I'm still confused as to how those backups were being created, though. | |
| Apr 19, 2022 at 7:34 | answer | added | VirtualWolf | timeline score: 3 | |
| Apr 19, 2022 at 7:30 | comment | added | VirtualWolf | @muru You absolute legend, I figured I'd just double-check that to be sure, and changing my crontab entry to /bin/bash -c 'ls -tr /Users/virtualwolf/Documents/InfluxDB_Backups resulted in an "Operation not permitted" error! I need to give /usr/sbin/cron full disk access, and now everything works a treat. | |
| Apr 19, 2022 at 7:16 | history | edited | VirtualWolf | CC BY-SA 4.0 | added 857 characters in body |
| Apr 19, 2022 at 5:21 | comment | added | muru | @VirtualWolf so the very script that's able to create a file in /Users/virtualwolf/Documents/InfluxDB_Backups/ is not able to list files in it? | |
| Apr 19, 2022 at 5:11 | comment | added | VirtualWolf | @dg99 Yep, that's correct. | |
| Apr 19, 2022 at 5:04 | comment | added | VirtualWolf | @muru No, I get the output I pasted above ("If I put the exact same thing into cron..."), where it's just taken the path with the asterisk at the end as the literal path and hasn't done any expansion. | |
| Apr 19, 2022 at 4:16 | comment | added | dg99 | When you say "script" do you mean that the commands are in an executable file, and you're executing the file from cron? | |
| Apr 19, 2022 at 4:05 | comment | added | muru | If you put the same commands in your backup script in Cron, do you get the expected output? | |
| Apr 19, 2022 at 4:00 | comment | added | VirtualWolf | The whole disk is encrypted using FileVault and it's unlocked at boot when I put my password in, so no issues there. :) I've been testing by just having the thing run every minute. | |
| Apr 19, 2022 at 3:49 | comment | added | muru | Is your home folder encrypted? Is it unencrypted when the cronjob runs? | |
| Apr 19, 2022 at 3:43 | history | asked | VirtualWolf | CC BY-SA 4.0 |