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):


logger=logger
count = int(0)

lst = ftp.nlst()
for fileName in lst:
#print fileName
if lastdate not in fileName:
continue
logger.info('To start the download file%s'%fileName)
f=open(fileName,'wb')
ftp.retrbinary('RETR '+fileName,f.write)
f.close()
count+=1
#return count
if count !=0:
#print 'fet get '+fileName
logger.info('Download the file%s'%fileName)
#return count
else:
logger.warning('The date for the%s file does not exist'%lastdate)
sys.exit(3)
return 3
Function: the implementation of the above
from ftplib import FTP
ftp=FTP(ftphost,timeout=30)
ftp.login(userid,passwd)
mgetBin(ftp,lastdate,code,logger,pathNum)
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', xxxx.zip')

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