So I'm trying to setup a display using this shifting tiles animation. I'm not putting it on a website, it's just going to be used on the local raspberry pi to display on a TV (http://localhost/) so I'm not worried about security. I've got it working by adding a few photos into the /var/www/html/ directory. But I'd like to be able to fill up a large flashdrive with 1000's of photos and randomly pull from that. My problem is I can't seem to get the permissions to do so. Are there any simple ways to read files from a usb drive?
1 Answer
Try 'sudo' to copy or link the files as 'root' to bypass permissions.
e.g.
sudo ln -s /[flashdrive-path]/*.jpg /var/www/html/
A neater way may be with relative path links, e.g. something like
sudo sh -c 'cd /var/www/html; ln -s /[flashdrive-path]/*.jpg .'
You could then change ownership to www-data using 'sudo chown on the symlinks'
If you still have permission problems, and you're not worried about security, you could make the image files and sub-directories readable by all, e.g.
chmod -R a+r /[flashdrive-path]/*
ln path/to/target linkName
. You could do this for each picture, or add a link directly to the folder containing all the pictures.