Hey. I've been writing a set of sh backup scripts over the past few
days. I'm having some trouble with the final thing with them.

This is the command that is being run by the "www" user via cron:
/usr/bin/find /usr/local/backups/ -ctime +7d -type f -not -name
"*daily_backup*" -ls

(Eventually, I'm going to change the "-ls" to "-delete")

This is the "ls -al" of /usr/local/backups:
drwxrwx---   2 www   wheel        512 Nov 13 04:29 .
drwxr-xr-x  15 root  wheel        512 Nov 12 20:24 ..
-rw-------   1 www   wheel   22250785 Nov 13 04:18 2008-11-13.mysql-main.sql
-rw-------   1 www   wheel     124781 Nov 13 04:18
-rw-------   1 www   wheel     674306 Nov 13 04:18 2008-11-13.mysql-wiki.sql
-rw-------   1 www   wheel  111845376 Nov 13 04:18 2008-11-13.www.tar
-r-xrw----   1 www   wheel       8109 Nov 13 04:16 daily_backup.sh

For some reason, the "find" command above is getting a "permission denied."
And, again, the "find" command is being run by the "www" user, who
owns the files and dir.
The exact message is: "find: .: Permission denied"

The "find" permissions:
-r-xr-xr-x  1 root  wheel  36800 Oct 23 01:17 /usr/bin/find

Also, all dirs above /usr/local/backups (/usr and /usr/local) are +x
for the "other" user, so the www should be able to enter them:
drwxr-xr-x  17 root  wheel      512 Nov 12 20:38 usr
drwxr-xr-x  15 root  wheel      512 Nov 12 20:24 local

Does anyone have any idea what's causing this permission denied error?
Obviously it's some sort of permissions problem, but I have no idea
where or what exactly it is. It's driving me crazy.

Thanks a lot in advance.
freebsd-questions@freebsd.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to