Insufficient permissions

You much good, I have a problem with no clue now. The problem is described as follows:

I have a FTP program written in Python, as follows

def mgetBin(ftp,lastdate,code,logger,pathNum):

count = int(0)

lst = ftp.nlst()
for fileName in lst:
#print fileName
if lastdate not in fileName:
continue'To start the download file%s'%fileName)
ftp.retrbinary('RETR '+fileName,f.write)
#return count
if count !=0:
#print 'fet get '+fileName'Download the file%s'%fileName)
#return count
logger.warning('The date for the%s file does not exist'%lastdate)
return 3
Function: the implementation of the above
from ftplib import FTP
A few days before the execution is normal, today suddenly wrong. The following error:
-> mgetBin(ftp,lastdate,code,logger,pathNum)
(Pdb) n
IOError: (13, 'Permission denied',')

I directly in Linux FTP to download, can be downloaded to file.

In the Linux implementation of the python command, the downloading operation is also possible, but above the program execution, called permission error, before the program is normal, today is wrong. Who has what recommendations do not, is the need to explicitly authorized in the program.
Python version 2.6

Started by Nicholas at February 21, 2016 - 9:54 PM

The original files directory, is being changed user group, resulting in insufficient permissions file.

Posted by Nicholas at February 22, 2016 - 10:29 PM

Fix it. .

Posted by Sebastian at March 03, 2016 - 10:30 PM