Hello There, Guest! Login Register
Logo
Dismiss this notice
MaDLeeTs is not responsible for any attacks that are carried out on networks, websites or servers.
MaDLeeTs staff members cannot be held responsible.
All information on this forum is for educational purposes only.


Permission denied:

  • 0 Vote(s) - 0 Average


10-19-2014, 02:42 AM #1
mehrabk Offline Junior Member **
Registered
Posts:3 Threads:1 Joined:Oct 2014 Reputation: 0
Mood: None
Hi guys ,
how i can fix this problem in python 2.7 ?
IOError: [Errno 13] Permission denied
Code:
import os, fnmatch
from shutil import *
for subdir, dirs, files in os.walk('e:'):
    for file in files:
      if fnmatch.fnmatch(file, '*.pdf'):
          print file
          copyfile(file,'/dir')

10-19-2014, 02:44 AM #2
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
you have no rights for that area Smiley1 you can try a right edit over chmod Smiley1

[Image: xodhvlpa.jpg]
[Image: test.php]

10-19-2014, 03:41 AM #3
mehrabk Offline Junior Member **
Registered
Posts:3 Threads:1 Joined:Oct 2014 Reputation: 0
Mood: None
i am using win xp :|

10-19-2014, 04:13 AM #4
T3N38R15 Offline ? lawless-coder *****
Moderators
Posts:812 Threads:48 Joined:Jan 2014 Reputation: 126
Mood: Fine
then you have simply no rights to read in that area.
or the area don't exist.

[Image: xodhvlpa.jpg]
[Image: test.php]

10-19-2014, 06:13 AM #5
VIRkid Offline MadLeets Vip ******
V.I.P
Posts:62 Threads:9 Joined:Oct 2013 Reputation: 9
Mood: Blessed
Simple file copy function . just give filename and destination . for EACH file

Code:
def copier(fil,dst):
    f=open(fil,'rb')
    fr=f.read()
    f.close()
    fw=open("%s\\%s"%(dst,fil),'wb')
    fw.write(fr)
    fw.close()
#Example
#copier('friend.jpg','dir//')

10-22-2014, 09:27 PM #6
the nightmare Offline TeaM MaDLeeTs ***
TeaM MaDLeeTs
Posts:301 Threads:49 Joined:Apr 2014 Reputation: 8
Mood: Hacker
run as administrator Biggrinsmiley

10-23-2014, 03:12 AM #7
VIRkid Offline MadLeets Vip ******
V.I.P
Posts:62 Threads:9 Joined:Oct 2013 Reputation: 9
Mood: Blessed
Nah Biggrinsmiley it's not administrator issue nightmare Biggrinsmiley i checked that

10-23-2014, 08:20 PM #8
mehrabk Offline Junior Member **
Registered
Posts:3 Threads:1 Joined:Oct 2014 Reputation: 0
Mood: None
This Line > copyfile(file,'/dir')

For Copyfile must have full address of file. this line give me file name Biggrinsmiley






Forum Jump:


Users browsing this thread:1 Guest(s)