delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/03/08/13:58:19

X-Spam-Check-By: sourceware.org
To: cygwin AT cygwin DOT com
From: Jerome Fong <jfong AT successmetricsinc DOT com>
Subject: Still having problems with cron writing to a restricted directory
Date: Thu, 08 Mar 2007 10:57:43 -0800
Lines: 20
Message-ID: <espmam$cb$1@sea.gmane.org>
Mime-Version: 1.0
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: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019