Python PermissionError: [ошибка 13] отказано в разрешении Решение

Python –º–æ–∂–µ—Ç –æ—Ç–∫—Ä—ã–≤–∞—Ç—å, —á–∏—Ç–∞—Ç—å –∏ –∑–∞–ø–∏—Å—ã–≤–∞—Ç—å —Ñ–∞–π–ª—ã —Ç–æ–ª—å–∫–æ –≤ —Ç–æ–º —Å–ª—É—á–∞–µ, –µ—Å–ª–∏ —É –∏–Ω—Ç–µ—Ä–ø—Ä–µ—Ç–∞—Ç–æ—Ä–∞ –µ—Å—Ç—å –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã–µ —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è. –ï—Å–ª–∏ –≤—ã –ø–æ–ø—ã—Ç–∞–µ—Ç–µ—Å—å –æ—Ç–∫—Ä—ã—Ç—å, –ø—Ä–æ—á–∏—Ç–∞—Ç—å –∏–ª–∏ –∑–∞–ø–∏—Å–∞—Ç—å –≤ —Ñ–∞–π–ª, –¥–ª—è –∫–æ—Ç–æ—Ä–æ–≥–æ Python –Ω–µ –∏–º–µ–µ—Ç —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–π, –≤—ã —Å—Ç–æ–ª–∫–Ω–µ—Ç–µ—Å—å —Å –æ—à–∏–±–∫–æ–π PermissionError: [errno 13] permission denied.

–í —ç—Ç–æ–º —Ä—É–∫–æ–≤–æ–¥—Å—Ç–≤–µ –º—ã –æ–±—Å—É–¥–∏–º, —á—Ç–æ –æ–∑–Ω–∞—á–∞–µ—Ç —ç—Ç–∞ –æ—à–∏–±–∫–∞ –∏ –ø–æ—á–µ–º—É –æ–Ω–∞ –≤–æ–∑–Ω–∏–∫–∞–µ—Ç. –ú—ã —Ä–∞—Å—Å–º–æ—Ç—Ä–∏–º –ø—Ä–∏–º–µ—Ä, —á—Ç–æ–±—ã –≤—ã –º–æ–≥–ª–∏ —Ç–æ—á–Ω–æ —É–∑–Ω–∞—Ç—å, –∫–∞–∫ —Ä–µ—à–∏—Ç—å —ç—Ç—É –æ—à–∏–±–∫—É.

PermissionError: [errno 13] –¥–æ—Å—Ç—É–ø –∑–∞–ø—Ä–µ—â–µ–Ω

–ö–æ–º–ø—å—é—Ç–µ—Ä—ã –∏—Å–ø–æ–ª—å–∑—É—é—Ç –ø—Ä–∞–≤–∞ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª–∞–º –¥–ª—è –∑–∞—â–∏—Ç—ã —Ü–µ–ª–æ—Å—Ç–Ω–æ—Å—Ç–∏ —Ñ–∞–π–ª–æ–≤ . –ü–æ —É–º–æ–ª—á–∞–Ω–∏—é –¥–æ—Å—Ç—É–ø –∫ –Ω–µ–∫–æ—Ç–æ—Ä—ã–º —Ñ–∞–π–ª–∞–º –æ–≥—Ä–∞–Ω–∏—á–µ–Ω. –í—ã –º–æ–∂–µ—Ç–µ –∏–∑–º–µ–Ω–∏—Ç—å –ø—Ä–∞–≤–∞ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª—É –≤ –ª—é–±–æ–µ –≤—Ä–µ–º—è.

–î–æ–ø—É—Å—Ç–∏–º, –≤—ã —Ä–∞–±–æ—Ç–∞–µ—Ç–µ –Ω–∞–¥ –≤–∞–∂–Ω–æ–π –ø—Ä–æ–≥—Ä–∞–º–º–æ–π. –í—ã –º–æ–∂–µ—Ç–µ –∑–∞—Ö–æ—Ç–µ—Ç—å, —á—Ç–æ–±—ã —ç—Ç–∞ –ø—Ä–æ–≥—Ä–∞–º–º–∞ –±—ã–ª–∞ –¥–æ—Å—Ç—É–ø–Ω–∞ –¥–ª—è —á—Ç–µ–Ω–∏—è —Ç–æ–ª—å–∫–æ –≤–∞–º. –î–ª—è —ç—Ç–æ–≥–æ –≤—ã –º–æ–∂–µ—Ç–µ –∏–∑–º–µ–Ω–∏—Ç—å –ø–∞—Ä–∞–º–µ—Ç—Ä " read " —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è –Ω–∞ –≤—Å–µ —Ñ–∞–π–ª—ã –∏ –ø–∞–ø–∫–∏ –≤ –≤–∞—à–µ–π –ø—Ä–æ–≥—Ä–∞–º–º–µ. –≠—Ç–æ –æ–≥—Ä–∞–Ω–∏—á–∏—Ç –¥–æ—Å—Ç—É–ø –∫ –≤–∞—à–µ–π –ø—Ä–æ–≥—Ä–∞–º–º–µ.

–õ—é–±–æ–π —Ñ–∞–π–ª, –∫ –∫–æ—Ç–æ—Ä–æ–º—É –≤—ã –ø—ã—Ç–∞–µ—Ç–µ—Å—å –ø–æ–ª—É—á–∏—Ç—å –¥–æ—Å—Ç—É–ø –∏–∑ –ø—Ä–æ–≥—Ä–∞–º–º—ã Python, –¥–æ–ª–∂–µ–Ω –±—ã—Ç—å –¥–æ—Å—Ç—É–ø–µ–Ω –¥–ª—è —á—Ç–µ–Ω–∏—è –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—é –∏–ª–∏ –≥—Ä—É–ø–ø–µ, –∫–æ—Ç–æ—Ä—ã–µ –∑–∞–ø—É—Å–∫–∞—é—Ç —ç—Ç–æ—Ç —Ñ–∞–π–ª.

–ï—Å–ª–∏ –≤—ã –∑–∞–ø—É—Å–∫–∞–µ—Ç–µ —Å–∫—Ä–∏–ø—Ç Python –∏–∑ –ø—Ä–æ—Ü–µ—Å—Å–∞ –≤–µ–±-—Å–µ—Ä–≤–µ—Ä–∞, –Ω–∞–ø—Ä–∏–º–µ—Ä, –≤–∞–º –Ω–µ–æ–±—Ö–æ–¥–∏–º–æ —É–±–µ–¥–∏—Ç—å—Å—è, —á—Ç–æ –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—å, –≤–ª–∞–¥–µ—é—â–∏–π –≤–µ–±-—Å–µ—Ä–≤–µ—Ä–æ–º, –∏–º–µ–µ—Ç –¥–æ—Å—Ç—É–ø –∫–æ –≤—Å–µ–º —Ñ–∞–π–ª–∞–º, –Ω–∞ –∫–æ—Ç–æ—Ä—ã–µ –≤—ã —Å—Å—ã–ª–∞–µ—Ç–µ—Å—å –≤ —Å–≤–æ–µ–º –∫–æ–¥–µ.

–ü—Ä–∏–º–µ—Ä —Å—Ü–µ–Ω–∞—Ä–∏—è

–ú—ã —Å–æ–±–∏—Ä–∞–µ–º—Å—è —Å–æ–∑–¥–∞—Ç—å –ø—Ä–æ–≥—Ä–∞–º–º—É, –∫–æ—Ç–æ—Ä–∞—è —Å—á–∏—Ç—ã–≤–∞–µ—Ç —Å–ø–∏—Å–æ–∫ –æ—Ü–µ–Ω–æ–∫ –ù–§–õ –∏–∑ —Ñ–∞–π–ª–∞ –≤ –ø—Ä–æ–≥—Ä–∞–º–º—É.

–£ –Ω–∞—Å –µ—Å—Ç—å —Ñ–∞–π–ª —Å –∏–º–µ–Ω–µ–º afc_east.csv, –∫–æ—Ç–æ—Ä—ã–π —Å–æ–¥–µ—Ä–∂–∏—Ç —Å–ª–µ–¥—É—é—â–µ–µ:

81% —É—á–∞—Å—Ç–Ω–∏–∫–æ–≤ –∑–∞—è–≤–∏–ª–∏, —á—Ç–æ –æ–Ω–∏ –ø–æ—á—É–≤—Å—Ç–≤–æ–≤–∞–ª–∏ —Å–µ–±—è –±–æ–ª–µ–µ —É–≤–µ—Ä–µ–Ω–Ω—ã–º–∏ –≤ —Å–≤–æ–∏—Ö –ø–µ—Ä—Å–ø–µ–∫—Ç–∏–≤–∞—Ö —Ç—Ä—É–¥–æ—É—Å—Ç—Ä–æ–π—Å—Ç–≤–∞ –≤ —Å—Ñ–µ—Ä–µ –≤—ã—Å–æ–∫–∏—Ö —Ç–µ—Ö–Ω–æ–ª–æ–≥–∏–π –ø–æ—Å–ª–µ –ø–æ—Å–µ—â–µ–Ω–∏—è —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è. –ü—Ä–æ–π–¥–∏—Ç–µ –∫—É—Ä—Å –æ–±—É—á–µ–Ω–∏—è —Å–µ–≥–æ–¥–Ω—è.

–°—Ä–µ–¥–Ω–∏–π –≤—ã–ø—É—Å–∫–Ω–∏–∫ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –ø–æ—Ç—Ä–∞—Ç–∏–ª –º–µ–Ω–µ–µ —à–µ—Å—Ç–∏ –º–µ—Å—è—Ü–µ–≤ –Ω–∞ –ø–µ—Ä–µ—Ö–æ–¥–Ω—É—é –∫–∞—Ä—å–µ—Ä—É, –æ—Ç –Ω–∞—á–∞–ª–∞ —É—á–µ–±–Ω–æ–≥–æ –ª–∞–≥–µ—Ä—è –¥–æ –ø–æ–∏—Å–∫–∞ —Å–≤–æ–µ–π –ø–µ—Ä–≤–æ–π —Ä–∞–±–æ—Ç—ã.

–ù–∞—à —Ñ–∞–π–ª - —ç—Ç–æ CSV. –ú—ã —Å–æ–±–∏—Ä–∞–µ–º—Å—è –∏–º–ø–æ—Ä—Ç–∏—Ä–æ–≤–∞—Ç—å –º–æ–¥—É–ª—å csv Python –≤ –Ω–∞—à –∫–æ–¥, —á—Ç–æ–±—ã –º—ã –º–æ–≥–ª–∏ —Ä–∞–±–æ—Ç–∞—Ç—å —Å —Ñ–∞–π–ª–æ–º:

–¢–µ–ø–µ—Ä—å –¥–∞–≤–∞–π—Ç–µ –æ—Ç–∫—Ä–æ–µ–º –Ω–∞—à —Ñ–∞–π–ª –≤ –Ω–∞—à–µ–π –ø—Ä–æ–≥—Ä–∞–º–º–µ Python. –ú—ã –º–æ–∂–µ–º —Å–¥–µ–ª–∞—Ç—å —ç—Ç–æ —Å –ø–æ–º–æ—â—å—é –æ–ø–µ—Ä–∞—Ç–æ—Ä–∞ csv.reader ():

–≠—Ç–æ—Ç –∫–æ–¥ –æ—Ç–∫—Ä–æ–µ—Ç—Å—è —Ñ–∞–π–ª —Å –∏–º–µ–Ω–µ–º afc_east.csv –≤ —Ä–µ–∂–∏–º–µ —á—Ç–µ–Ω–∏—è. –ó–∞—Ç–µ–º –ø—Ä–æ–≥—Ä–∞–º–º–∞ –¥–ª—è —á—Ç–µ–Ω–∏—è CSV –∏–Ω—Ç–µ—Ä–ø—Ä–µ—Ç–∏—Ä—É–µ—Ç —Ñ–∞–π–ª. –ß–∏—Ç–∞—Ç–µ–ª—å CSV –≤–µ—Ä–Ω–µ—Ç —Å–ø–∏—Å–æ–∫ –∑–Ω–∞—á–µ–Ω–∏–π, –ø–æ –∫–æ—Ç–æ—Ä—ã–º –º—ã –º–æ–∂–µ–º –≤—ã–ø–æ–ª–Ω–∏—Ç—å –∏—Ç–µ—Ä–∞—Ü–∏—é. –ó–∞—Ç–µ–º –º—ã –≤—ã–≤–æ–¥–∏–º –∫–∞–∂–¥–æ–µ –∏–∑ —ç—Ç–∏—Ö –∑–Ω–∞—á–µ–Ω–∏–π –≤ –∫–æ–Ω—Å–æ–ª—å, –∏—Å–ø–æ–ª—å–∑—É—è —Ü–∏–∫–ª for –∏ –æ–ø–µ—Ä–∞—Ç–æ—Ä print (), —á—Ç–æ–±—ã –º—ã –º–æ–≥–ª–∏ –≤–∏–¥–µ—Ç—å —Å–æ–¥–µ—Ä–∂–∏–º–æ–µ –Ω–∞—à–µ–≥–æ —Ñ–∞–π–ª–∞ –ø–æ—Å—Ç—Ä–æ—á–Ω–æ.

–î–∞–≤–∞–π—Ç–µ –∑–∞–ø—É—Å—Ç–∏–º –Ω–∞—à—É –ø—Ä–æ–≥—Ä–∞–º–º—É, —á—Ç–æ–±—ã —É–±–µ–¥–∏—Ç—å—Å—è, —á—Ç–æ –æ–Ω–∞ —Ä–∞–±–æ—Ç–∞–µ—Ç:

–ù–∞—à –∫–æ–¥ –≤–æ–∑–≤—Ä–∞—â–∞–µ—Ç –æ—à–∏–±–∫—É.

–†–µ—à–µ–Ω–∏–µ

PermissionError —É–∫–∞–∑—ã–≤–∞–µ—Ç —á—Ç–æ Python –Ω–µ –∏–º–µ–µ—Ç –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã—Ö —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–π –¥–ª—è –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª—É.

–î–∞–≤–∞–π—Ç–µ –ø—Ä–æ–≤–µ—Ä–∏–º —Ä–∞–∑—Ä–µ—à–µ–Ω–∏—è –Ω–∞—à–µ–≥–æ —Ñ–∞–π–ª–∞. –ú—ã –º–æ–∂–µ–º —Å–¥–µ–ª–∞—Ç—å —ç—Ç–æ —Å –ø–æ–º–æ—â—å—é ls -la command :

–ú—ã –≤–∏–¥–∏–º, —á—Ç–æ —Ñ–∞–π–ª afc_east.csv –ø—Ä–∏–Ω–∞–¥–ª–µ–∂–∏—Ç –∫–æ—Ä–Ω—é –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—å :

–≠—Ç–æ –ø—Ä–æ–±–ª–µ–º–∞, –ø–æ—Ç–æ–º—É —á—Ç–æ –º—ã –Ω–µ –∑–∞–ø—É—Å–∫–∞–µ–º Python –æ—Ç –∏–º–µ–Ω–∏ –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—è root. –≠—Ç–æ –æ–∑–Ω–∞—á–∞–µ—Ç, —á—Ç–æ Python –Ω–µ –º–æ–∂–µ—Ç –ø—Ä–æ—á–∏—Ç–∞—Ç—å –Ω–∞—à —Ñ–∞–π–ª. –ß—Ç–æ–±—ã –∏—Å–ø—Ä–∞–≤–∏—Ç—å —ç—Ç—É –æ—à–∏–±–∫—É, –Ω–∞–º –Ω—É–∂–Ω–æ –∏–∑–º–µ–Ω–∏—Ç—å –ø—Ä–∞–≤–∞ —Å–æ–±—Å—Ç–≤–µ–Ω–Ω–æ—Å—Ç–∏ –Ω–∞ –Ω–∞—à —Ñ–∞–π–ª —Å –ø–æ–º–æ—â—å—é –∫–æ–º–∞–Ω–¥—ã chown:

–≠—Ç–∞ –∫–æ–º–∞–Ω–¥–∞ –¥–µ–ª–∞–µ—Ç " james " –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—å –∏ " admin " group –≤–ª–∞–¥–µ–ª—å—Ü–µ–≤ —Ñ–∞–π–ª–∞.

–í –∫–∞—á–µ—Å—Ç–≤–µ –∞–ª—å—Ç–µ—Ä–Ω–∞—Ç–∏–≤—ã –º—ã –º–æ–≥–ª–∏ –±—ã –∏–∑–º–µ–Ω–∏—Ç—å –ø—Ä–∞–≤–∞ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª—É —Å –ø–æ–º–æ—â—å—é –∫–æ–º–∞–Ω–¥—ã chmod:

–≠—Ç–∞ –∫–æ–º–∞–Ω–¥–∞ –¥–µ–ª–∞–µ—Ç –Ω–∞—à —Ñ–∞–π–ª –¥–æ—Å—Ç—É–ø–Ω—ã–º –¥–ª—è —á—Ç–µ–Ω–∏—è –∏ –≤—ã–ø–æ–ª–Ω–µ–Ω–∏—è –¥–ª—è –≤—Å–µ—Ö. –§–∞–π–ª –¥–æ—Å—Ç—É–ø–µ–Ω –¥–ª—è –∑–∞–ø–∏—Å–∏ —Ç–æ–ª—å–∫–æ –≤–ª–∞–¥–µ–ª—å—Ü—É. –î–∞–≤–∞–π—Ç–µ –ø–æ–ø—Ä–æ–±—É–µ–º —Å–Ω–æ–≤–∞ –∑–∞–ø—É—Å—Ç–∏—Ç—å –Ω–∞—à —Å–∫—Ä–∏–ø—Ç Python:

–ù–∞—à –∫–æ–¥ —É—Å–ø–µ—à–Ω–æ —Ä–∞—Å–ø–µ—á–∞—Ç—ã–≤–∞–µ—Ç –≤—Å–µ –æ—Ü–µ–Ω–∫–∏ –∏–∑ –Ω–∞—à–µ–≥–æ —Ñ–∞–π–ª–∞.

–ó–∞–∫–ª—é—á–µ–Ω–∏–µ

–û—à–∏–±–∫–∞ PermissionError: [errno 13] —Ä–∞–∑—Ä–µ—à–µ–Ω–æ –≤–æ–∑–Ω–∏–∫–∞–µ—Ç, –∫–æ–≥–¥–∞ –≤—ã –ø—ã—Ç–∞–µ—Ç–µ—Å—å –ø–æ–ª—É—á–∏—Ç—å –¥–æ—Å—Ç—É–ø –∫ —Ñ–∞–π–ª—É –∏–∑ Python, –Ω–µ –∏–º–µ—è –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã—Ö —Ä–∞–∑—Ä–µ—à–µ–Ω–∏–π.

–ß—Ç–æ–±—ã –∏—Å–ø—Ä–∞–≤–∏—Ç—å —ç—Ç—É –æ—à–∏–±–∫—É, –∏—Å–ø–æ–ª—å–∑—É–π—Ç–µ –∫–æ–º–∞–Ω–¥—É chmod –∏–ª–∏ chown, —á—Ç–æ–±—ã –∏–∑–º–µ–Ω–∏—Ç—å –ø—Ä–∞–≤–∞ –¥–æ—Å—Ç—É–ø–∞ –∫ —Ñ–∞–π–ª—É, —á—Ç–æ–±—ã –Ω—É–∂–Ω—ã–π –ø–æ–ª—å–∑–æ–≤–∞—Ç–µ–ª—å –∏ / –∏–ª–∏ –≥—Ä—É–ø–ø–∞ –º–æ–∂–µ—Ç –ø–æ–ª—É—á–∏—Ç—å –¥–æ—Å—Ç—É–ø –∫ —Ñ–∞–π–ª—É. –¢–µ–ø–µ—Ä—å —É –≤–∞—Å –µ—Å—Ç—å –Ω–∞–≤—ã–∫–∏, –Ω–µ–æ–±—Ö–æ–¥–∏–º—ã–µ –¥–ª—è —Ä–µ—à–µ–Ω–∏—è —ç—Ç–æ–π –æ—à–∏–±–∫–∏ –∫–∞–∫ –ø—Ä–æ—Ñ–µ—Å—Å–∏–æ–Ω–∞–ª!

Shop

Learn programming in R: courses

$

Best Python online courses for 2022

$

Best laptop for Fortnite

$

Best laptop for Excel

$

Best laptop for Solidworks

$

Best laptop for Roblox

$

Best computer for crypto mining

$

Best laptop for Sims 4

$

Latest questions

NUMPYNUMPY

psycopg2: insert multiple rows with one query

12 answers

NUMPYNUMPY

How to convert Nonetype to int or string?

12 answers

NUMPYNUMPY

How to specify multiple return types using type-hints

12 answers

NUMPYNUMPY

Javascript Error: IPython is not defined in JupyterLab

12 answers

News


Wiki

Python OpenCV | cv2.putText () method

numpy.arctan2 () in Python

Python | os.path.realpath () method

Python OpenCV | cv2.circle () method

Python OpenCV cv2.cvtColor () method

Python - Move item to the end of the list

time.perf_counter () function in Python

Check if one list is a subset of another in Python

Python os.path.join () method