This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Still having problems with cron writing to a restricted directory
- From: Jerome Fong <jfong at successmetricsinc dot com>
- To: cygwin at cygwin dot com
- Date: Thu, 08 Mar 2007 10:57:43 -0800
- Subject: Still having problems with cron writing to a restricted directory
Hi there,
Sorry, but I am totally confused now. I have a script that creates a
new sub-directory and copies files over to the new sub-directory. My
problem is, the directory where this sub-directory is supposed to be
created is restricted. Only I have have write permissions to the
directory, everyone else has read privileges.
When I run my script interactively, the sub-directory gets written.
However, when I run the same script under cron, I get the following error:
mkdir: cannot create directory `/builds/test': Permission denied
I search everywhere but there doesn't seem to be a similar issue. I read
that cron runs scripts under a different user, and tried adding
"su - test_user" to my script as suggested. I made sure my uid and gid
matched in my cron and interactive logs and the environment "env"
matched up. But I still cannot get my sub-directory created within cron.
Help!
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/