This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cron script can awk wget file but not head/cat it


>  
> And sntl_data_moved_then_headed.csv contains: Cannot open file 
> /home/tompagano/test/sntl_data_moved.csv
> This is a simplification of a much broader script I've been trying to run that 
> was failing, but I've been able to isolate it down to this specific problem. I'm 
> quite baffled as to why moving then awking a file would give a different result 
> than catting or heading. It doesn't appear to be a permissions issue as far as I 
> can tell because I can still move the files around? Am I missing something here? 

Yes - remember that cron scripts run as the SYSTEM user, so they have
different access permissions than the command line.  When you use cp,
and a new file is created, the new file is owned by the current user; but
when you use mv, the renamed file maintains the same owner.  Based on
who owns what, your cron script can't read files depending on how those
files were obtained and moved/copied.

--
Eric Blake



--- Begin Message ---

Attachment: cygcheck.out
Description: cygcheck.out


--- End Message ---
--
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/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]