First to say that I know basics of Linux systems. I am familiar with cron jobs. I am using CakePHP shell as cronjob.
The script is using model's method to download pages from site user entered. Everything works fine but when I create cron as user bokac the script doesn't have the right privileges to create folders (I am guessing that) because if I delete cronjob for that user, and switch user to www-data and create the same cron there, the script works, and creates required folders.
How to make script do that with first user, bokac ? I am not sure what or who created user www-data. Any help appreciated.
bokac
??www-data
is the user under which the Apache web server runs. This also means that everything done by Apache (especially including PHP scripts) will be done with the permissions of userwww-data
(and also groupwww-data
) by default.So one work around is add userbokac
to groupwww-data
hope this helps :-)