as user, do: touch /home/user/LOCKSCREENQUOTES/.test.png chmod a+w /home/user/LOCKSCREENQUOTES/.test.png chmod a+w /home/user/LOCKSCREENQUOTES and btw you should normally run the script as user, not as root, iirc...