permission needed for Python to access USB drive?
0
votes
1
answer
2322
views
I got this Python script that reads media files from USB stick. It used to run fine, today it keeps giving me
OS Error: [Errno 13] Permission denied: media/myName/usbName
when the script runs the command os.listdir()
.
os.listdir()
simply checks what folders and files are in the main folder. It doesn't write anything, so why is there a permission error? I can use the USB stick just fine, open, add and delete files in it myself. I'm not very experienced with Linux, what might be the issue? Some kind of permission, etc. setting for the script file or the usb drive that somehow magically changed without me doing anything?
Using Lubuntu 14.04.
Asked by Leo Ervin
(121 rep)
Sep 25, 2015, 10:15 PM
Last activity: Jun 23, 2025, 10:05 PM
Last activity: Jun 23, 2025, 10:05 PM