X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Jerome Fong Subject: Still having problems with cron writing to a restricted directory Date: Thu, 08 Mar 2007 10:57:43 -0800 Lines: 20 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit User-Agent: Thunderbird 1.5.0.10 (Windows/20070221) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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/